OPINION
STOWERS, Justice.This Court granted a writ of certiorari to review the Court of Appeals decision mandating the awarding of good time credits against sentence to defendants for the period of their confinement in the Bernalillo County Detention Center prior to trial, judgment, and sentencing. The district court denied defendants’ motions for good time credits on the grounds that it lacked statutory authority to grant them. After resolving a jurisdictional question, the Court of Appeals held that the granting of good time credits for presentence confinement is constitutionally required. We now reverse the Court of Appeals decision.
This case presents the following issues:
(1) Does the district court have jurisdiction under NMSA 1978, Crim.P.Rule 57.1 (Repl.Pamp.1985), to correct or modify sentences by ordering that defendants be given good time credits against their sentences for the periods they spent in presentence confinement?
(2) In the absence of statutory authorization for such credits, do the equal protection and due process clauses of the New Mexico and United States constitutions, N.M. Const, art. II, § 18; U.S. Const, amend. XIV, § 1, compel the granting of good time credits to defendants for the periods of their presentence confinement, where persons convicted and sentenced are eligible for good time credits for periods served in correctional institutions and county jails pursuant to NMSA 1978, Sections 33-2-34, 33-3-9, and 33-8-14 (Repl.Pamp. 1983 & Cum.Supp.1985)?
We hold, first, that the granting of good time credits is an administrative matter for the Corrections Department or the county sheriff or jail administrator, and that Rule 57.1 does not give the district court jurisdiction to entertain a motion for good time credits. We hold, second, that the statutory scheme under which these defendants were denied good time credits for the periods of their presentence confinement does not offend the constitutional guarantees of equal protection and due process of law. We therefore reverse the Court of Appeals decision, and affirm the district court’s denial of these motions.
In three separate cases, defendants Aqui, Sena, and Gobel were arrested on various criminal charges, and bail bond was set as a condition of release. In each case the defendant failed to make bail, and therefore was detained prior to trial in the Bernalillo County Detention Center. Each defendant ultimately pled guilty pursuant to a plea and disposition agreement, and remained in detention until the district court entered judgment and sentence.
The district court gave each defendant credit against his sentence for the period spent in presentence confinement, as is required under NMSA 1978, Section 31-20-12 (Repl.Pamp.1981). Each defendant thereafter filed a Rule 57.1 motion for correction or modification of sentence, seeking in addition good time credits for the period of his presentence confinement. In each case the district court denied the motion, finding that it lacked statutory authority to grant such credits. Defendants appealed, and upon their motion, the Court of Appeals consolidated these three cases for review.
I. Jurisdiction Under Rule 57.1.
Because the Court of Appeals has jurisdiction of direct appeals of postconviction remedies only under Rule 57.1, the defendants characterized their motions for good time credits as motions for the correction or modification of sentence under Rule 57.1(a). In relevant part, that rule provides that “[t]he district court may correct an illegal sentence at any time and may correct a sentence imposed in an illegal manner within * * * [thirty days after the sentence is imposed].” Crim.P.R. 57.1(a).
The Court of Appeals held that because these defendants had not received “illegal sentences,” they were not eligible for modification of sentence “at any time.” Crim. P.R. 57.1(a). It therefore dismissed the appeal of defendant Gobel, whose motion in the district court had not been timely filed within thirty days of sentencing. Holding that the district court did have jurisdiction to hear the timely motions of defendants Aqui and Sena, the Court of Appeals entertained their appeals on the merits.
We agree with the Court of Appeals that defendants, who received unambiguous sentences within the limits authorized by our sentencing statutes, cannot seek correction of “illegal sentences” under Rule 57.1(a). See State v. Harris, 101 N.M. 12, 14-15, 677 P.2d 625, 627-28 (Ct. App.1984). We disagree with the Court of Appeals implication that two of the defendants can seek, under Rule 57.1(a), correction of sentences imposed in an “illegal manner,” for they do not allege procedural deficiencies in their sentencing by the district court.
Unlike mandatory credits under Section 31-20-12, the deduction of good time credits from an inmate’s sentence is a discretionary matter entrusted not to the courts but to the administrators of the Corrections Department or the county jails. See §§ 33-2-34, 33-3-9, 33-8-14; see generally NMSA 1978, §§ 33-1-1 to 33-10-2 (Repl.Pamp.1983 & Cum.Supp.1985). The computation of good time credits is exclusively an administrative responsibility, and such deductions have no bearing upon the validity of the original sentence imposed by the district court. Cf. Drew v. United States, 248 F.2d 75 (9th Cir.1957) (federal law). Defendants’ claims of entitlement to good time credits therefore challenge the execution of their sentences rather than the sentences themselves, and cannot be addressed by Rule 57.1(a) motions for correction of illegal sentences or of sentences imposed in an illegal manner. Cf. United States v. Brown, 753 F.2d 455 (5th Cir. 1985); United States v. Giddings, 740 F.2d 770 (9th Cir.1984); Lee v. United States, 400 F.2d 185 (9th Cir.1968) (discussing federal law regarding credits for presentence confinement).
II. Constitutional Claim for Good Time Credits.
Reaching the merits of the case, the Court of Appeals distinguished New Mexico’s scheme of good time credits from the New York good time credit law upheld against an equal protection challenge in McGinnis v. Royster, 410 U.S. 263, 93 S.Ct. 1055, 35 L.Ed.2d 282 (1973). The court, however, failed to analyze whether New Mexico’s statutory and administrative good time credit scheme comports with the constitutional guarantee of equal protection of the laws. Instead, relying on Bearden v. Georgia, 461 U.S. 660, 103 S.Ct. 2064, 76 L.Ed.2d 221 (1983), the Court of Appeals held that a due process approach was in order, and concluded that “fundamental fairness” demanded that the defendants be given good time credits for the periods of their presentence confinement.
We cannot agree. McGinnis does control here, and under that decision New Mexico’s statutory scheme withstands defendants’ equal protection challenge. Furthermore, the Court of Appeals reliance upon due process considerations is inappropriate, unconvincing, and unnecessary to the resolution of this appeal. We hold, therefore, that New Mexico’s good time credit scheme does not violate the constitutional rights of these defendants.
a. Equal Protection of the Laws.
Subsection 33-2-34(A) provides that “[a]ny inmate confined in the penitentiary * * * may be awarded a deduction of not more than ten days’ meritorious good time per month based on good conduct * * * provided that an inmate who disobeys an order to perform labor * * * shall not receive meritorious good time * * Section 33-8-14 provides that “[ejvery inmate confined * * * and engaged in an enterprise program shall be awarded * * * [not more than twenty days’] industrial good time per month based on work conduct, performance and responsibilities * * Furthermore, Subsection 33-2-34(A) provides that any inmate not engaged in an enterprise program but engaged in “approved educational programs or performing facility support services may receive an additional deduction not to exceed five days meritorious good time per month * * In addition, any inmate who has performed “exceptionally meritorious service” may be eligible for a lump sum good time award under Subsection 33-2-34(B). Pursuant to its statutory mandate, the Corrections Department has promulgated rules and regulations for the awarding and the forfeiture of various categories of good time credits.
Subsection 33-3-9 provides that “any person imprisoned in the county jail [may be granted] a deduction of time from the term of his sentence for good behavior * * *” by the sheriff or jail administrator of the county, who is authorized to establish rules for the accrual of good time or to grant deductions with the approval of the committing judge. Such deductions may not exceed one-third of the term of the prisoner’s sentence. § 33-3-9.
Although the Legislature has authorized the Corrections Department and county sheriffs and jail administrators to award good time credits to inmates convicted and confined in their respective institutions, it has chosen not to authorize the awarding of good time credits to persons detained in the county jails prior to trial, conviction, and sentencing. Because the Legislature has mandated under Section 31-20-12 that presentence detainees be given credit against their final sentences for the periods spent in presentence confinement, defendants argue that in effect they have served a portion of their sentences in presentence confinement ineligible to earn good time credits. Defendants therefore may have to spend more time in confinement than would persons not confined until sentencing, who are eligible for good time credits throughout their imprisonment. The statutory scheme draws a distinction between the treatment of prisoners detained prior to sentencing and those not confined until after sentencing which, the defendants argue, violates the equal protection of the laws and discriminates against persons unable to afford bail.
This argument was rejected by the United States Supreme Court in McGinnis, and we reject it here. Despite their allegations that our statutes discriminate against defendants because they are indigent and unable to post bail bond, defendants do not contend that “strict scrutiny” of a classification based upon a “suspect class” is in order here. See Harper v. Virginia State Board of Elections, 383 U.S. 663, 86 S.Ct. 1079, 16 L.Ed.2d 169 (1966); Loving v. Virginia, 388 U.S. 1, 87 S.Ct. 1817, 18 L.Ed.2d 1010 (1967). Therefore, we “inquire only whether the challenged distinction rationally furthers some legitimate, articulated state purpose.” McGinnis, 410 U.S. at 270, 93 S.Ct. at 1059. We conclude that it does.
The Legislature has stated that “[tjhe purpose of the Corrections Industries Act * * * is to enhance the rehabilitation, education and vocational skills of inmates through productive involvement in enterprises and public works of benefit to state agencies and local public bodies and to minimize inmate idleness.” NMSA 1978, § 33-8-3 (Repl.Pamp.1983). It has equipped the facilities of the Corrections Department to serve this purpose, and has sought to effectuate its policy by requiring all inmates to perform labor, NMSA 1978, § 33-8-4 (Repl.Pamp.1983), by mandating industrial good time deductions, § 33-8-14, and by forbidding the awarding of meritorious good time credits to any inmate who disobeys an order to perform such labor, § 33-2-34(A).
A similar purpose guides the treatment of convicted and sentenced prisoners confined in county jails. Pursuant to NMSA 1978, § 33-3-19 (Cum.Supp.1985), county sheriffs or jail administrators can compel those prisoners to work on public projects without pay or remuneration. This work may be considered in granting good time credits under Section 33-3-9 for “good behavior and industry.”
All good time awards in both the correctional institutions and the county jails, therefore, are predicated upon the willingness of the prisoner to perform labor as required by law, as well as upon his good conduct. Furthermore, the statutes and regulations contemplate systematic recording of each prisoner’s conduct and rehabilitation performance for purposes of the accrual and forfeiture of good time credits. On the other hand, persons held in presentence confinement are presumed innocent and are not compelled to work. While in some instances records of their conduct are maintained, the statutory record-keeping requirements are minimal. See NMSA 1978, § 33-3-7 (Cum.Supp.1985).
In short, it is clear that the distinction our statutes draw between the treatment of presentence detainees and sentenced prisoners reflects an articulated state purpose of rehabilitation and industry, and that that purpose is legitimate and nonillusory. It is reasonable not to award good time credits for presentence confinement to detainees who are presumed innocent and therefore are not yet subject to rehabilitation efforts or to compulsory labor requirements, especially when they are held without systematic evaluation in county jails lacking rehabilitation programs. Because there is a rational justification for declining to award good time credits for presentence confinement under these circumstances, New Mexico’s statutory scheme does not offend the constitutional guarantee of equal protection of the law. See McGinnis, 410 U.S. at 270-73, 93 S.Ct. at 1059-61.
Our conclusion is bolstered by the decisions of the United States Supreme Court in McGinnis and of the majority of courts of other jurisdictions which have addressed this question. Each decision, of course, rests upon a unique statutory scheme, but no court has found an equal protection violation where good time credits are predicated upon participation in rehabilitation programs and where all convicted prisoners are denied good time credits for their periods of presentence confinement. See McGinnis (former New York statute); People v. Turman, 659 P.2d 1368 (Colo. 1983); McCormick v. Hunt, 328 So.2d 140 (La.1976); Patino v. State, 331 N.W.2d 837 (S.D.1983); State v. Nyborg, 122 Wis.2d 765, 364 N.W.2d 553 (Wis.Ct.App.1985). But see Pruett v. Texas, 468 F.2d 51 (5th Cir.1972), aff'd in part, modified in part, 470 F.2d 1182 (5th Cir.1973), affd without opinion, 414 U.S. 802, 94 S.Ct. 118, 38 L.Ed.2d 39 (1973) (equal protection violation where convicted felon denied good time credits for confinement pending appeal); White v. Gilligan, 351 F.Supp. 1012 (S.D.Ohio) (decided prior to McGinnis)', People v. Sage, 26 Cal.3d 498, 165 Cal.Rptr. 280, 611 P.2d 874 (1980) (equal protection violation where detainee/misdemeanant eligible for presentence good time credits but detainee/felon is not; strict scrutiny standard of review); Hampton v. Rowe, 88 Ill.App.3d 352, 43 Ill.Dec. 511, 410 N.E.2d 511 (1980) (legislative intent to award good time credits regardless of work or rehabilitation); State ex rel. James v. Stamps, 562 S.W.2d 354 (Mo.1978) (en banc) (equal protection violation where felons sentenced to penitentiary receive presentence good time credits but felons sentenced to county jails do not).
lb. Due Process of Law.
The Court of Appeals rested its decision not upon equal protection, but upon due process grounds. Employing a “flexible due process approach,” it held that the defendants enjoyed a substantial interest in liberty which was impaired by the denial of presentence good time credits, while the state had a substantial interest in maintaining order in the penitentiary which would not be impaired by the granting of such credits. Therefore, it held, the district court must award presentence good time credits as an alternative means of achieving the state’s objectives. This, however, is a matter for the Legislature. The Court of Appeals order is completely without support in any previously enunciated theory of due process, and cannot stand.
. The Court of Appeals relied upon Bear-den v. Georgia, which held that once the state has determined that probation is a suitable punishment, the sentencing court must consider alternatives to imprisonment before it revokes probation solely due to an indigent probationer’s inability to pay fines or restitution. In effect, the Court held that the petitioner enjoyed a liberty interest in the conditional freedom that he had been granted, and that only under certain circumstances could he be deprived of that interest solely because of his indigent condition.
The present case, which involves presentence confinement rather than postconviction release on probation, is distinguishable from Bearden in many ways. The defendants enjoyed no constitutional, statutory, or administrative right to good time credits, nor had they been granted such credits as a matter of privilege. See Wolff v. McDonnell, 418 U.S. 539, 557, 94 S.Ct. 2963, 2975, 41 L.Ed.2d 935 (1974) (no constitutional right). They therefore had no recognized liberty interest at stake, and the State did not act to revoke any right or privilege previously enjoyed. Furthermore, when it established bail the district court had the opportunity and indeed the duty to consider each defendant’s circumstances and alternative means of securing his attendance at trial. See N.M. Const, art. II, § 13, U.S. Const, amend. VIII (prohibition against excessive bail and cruel and unusual punishment); NMSA 1978, Crim.P.R. 22 (Repl. Pamp.1985) (bail criteria); State v. Cebeda, 84 N.M. 306, 308, 502 P.2d 409, 411 (Ct.App.1972). We therefore cannot conclude that defendants here were denied good time credits solely due to indigency. The present case simply does not implicate the due process concerns that underlay the United States Supreme Court decision in Bearden.
The constitutional rights of pretrial detainees were addressed in Bell v. Wolfish, 441 U.S. 520, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979). The Court there held that, in evaluating conditions of pretrial confinement that allegedly deprive detainees of liberty without due process of law, the proper inquiry is whether those conditions amount to impermissible punishment of the detainee, or whether they are “but an incident of * * * [a] legitimate governmental purpose.” 441 U.S. at 538, 99 S.Ct. at 1873; see also State v. Smallwood, 94 N.M. 225, 229, 608 P.2d 537, 541 (Ct.App.1980). Defendants’ due process rights have not been violated.
In conclusion, we hold that New Mexico’s statutory scheme making prisoners eligible for awards of good time credits for the periods of their post-sentencing confinement in Correction Department facilities and county jails but not for the periods of their presentence confinement in county jails does not offend the equal protection and due process guarantees of the New Mexico and United States constitutions. We hold as well that the district court does not have jurisdiction under Crim.P.Rule 57.1(a) to correct or modify sentences by awarding good time credits for periods spent in presentence confinement. The decision of the Court of Appeals therefore is reversed, and the district court’s orders dismissing the Rule 57.1 motions of these defendants is reinstated.
IT IS SO ORDERED.
RIORDAN, C.J., and FEDERICI, J., concur. SOSA, Senior J., and WALTERS, J., dissent.