
721 P.2d 771 (1986)
104 N.M. 345
STATE of New Mexico, Petitioner,
v.
Joe A. AQUI, a/k/a Kajun Lee, Phillip Greg Sena, Bonita Marie Gobel, a/k/a Maria Bonita Boyd, a/k/a Bonita Maria Boyd, a/k/a Bernice Elain Boyed, a/k/a Katherine Ann Simpson, a/k/a Bernice Maria Gobel, a/k/a Caroline Mitchell, a/k/a Carolyn Mitchell, a/k/a Bonita Schanabel, Respondents.
No. 16313.
Supreme Court of New Mexico.
June 24, 1986.
*772 Paul Bardacke, Atty. Gen., Charles H. Rennick, Asst. Atty. Gen., Santa Fe, for petitioner.
Jacquelyn Robins, Chief Public Defender, Lynne Fagan, Appellate Defender, Sheila Lewis, Asst. Appellate Defender, Santa Fe, for respondents.

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:
*773 (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.
*774 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 "[e]very 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 *775 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 "[t]he 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 *776 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), aff'd 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).

b. 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 Bearden 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 *777 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.
SOSA, Senior Justice, dissenting.
In fairness to all, I agree with the Court of Appeals on this matter and therefore I cannot concur. I also adopt the Court of Appeals Opinion as my own and set it forth in its entirety.
WALTERS, Justice, dissenting.
I cannot agree with the majority opinion and I adopt the opinion of the Court of Appeals as my dissent.
                    APPENDIX
              STATE OF NEW MEXICO,
               Plaintiff-Appellee,
                       vs.
         JOE A. AQUI, a/k/a KAJUN LEE; PHILLIP
             GREG SENA; and BONITA MARIE
             GOBEL, a/k/a MARIA BONITA
             BOYD, a/k/a BONITA MARIA
             BOYD, a/k/a BERNICE ELAIN
             BOYED, a/k/a KATHERINE ANN
             SIMPSON, a/k/a BERNICE MARIA
             GOBEL, a/k/a CAROLINE MITCHELL,
             a/k/a CAROLYN MITCHELL,
             a/k/a BONITA SCHANABEL, Defendants-Appellants.
            Nos. 8857, 8914, 8940 (Consolidated)
           IN THE COURT OF APPEALS OF THE
                 STATE OF NEW MEXICO
                  Feb. 27, 1986
            APPEALS FROM THE DISTRICT
               COURT OF BERNALILLO
                     COUNTY
              Burt Cosgrove, Judge
            Gerard W. Thomson, Judge
                    OPINION
            HENDLEY, Judge.
The substantive issue involved in these three cases is whether a defendant should *778 be given good-time credit for time spent in the county jail in presentence confinement. We also discuss how the substantive issue may be raised. The motion for consolidation, previously taken under advisement, is granted.
All three defendants were sentenced. Because all were unable to make bail, they spent the time between arrest and sentencing in jail. All three defendants were given credit for this time served, pursuant to NMSA 1978, Section 31-20-12 (Repl.Pamp. 1981). Each filed a motion for additional credit for good time spent in jail. The theory of these motions was that a person admitted to bail during this time would be able to earn good-time credit for each day spent in the penitentiary pursuant to the sentence, and would, accordingly, serve a lesser sentence than a person unable to make bail during the presentence period of the case. NMSA 1978, Section 33-2-34(A) (Cum.Supp.1985) authorizes the corrections department to award good-time credit of ten days per month to prisoners, based on good conduct. Although there is a statute authorizing good time for time spent in jail, NMSA 1978, Section 33-3-9 (Cum.Supp. 1985), it is interpreted to apply only to people serving sentences in jails and not to people being detained there pending trial. In each of these cases, the facts are undisputed that defendants had clear conduct records and would be entitled to good-time credit for time spent in presentence confinement. The trial court denied each motion.
Although the substantive issue is identical in each case, the procedure is not. Aqui and Sena filed their motions for the credit within thirty days of the judgment and sentence. Gobel did not file her motion until after thirty days.
We first discuss the procedural aspects of these cases. We do so because jurisdictional issues are presented. We must first determine whether we have jurisdiction. See Rice v. Gonzales, 79 N.M. 377, 444 P.2d 288 (1968); State v. Weddle, 77 N.M. 417, 423 P.2d 609 (1967). Whether we have jurisdiction depends upon the nature of the remedy filed in the trial court. There are a number of potential remedies available to prisoners who have claims similar to those brought by these defendants. We need not decide in this case whether such remedies are appropriate. Apart from motions filed pursuant to NMSA 1978, Crim.P.Rule 57.1 (Repl.Pamp.1985), the trial court's denial of those remedies is not directly appealable. In re Forest, 45 N.M. 204, 113 P.2d 582 (1941) (habeas corpus); State v. Garcia, 101 N.M. 232, 680 P.2d 613 (Ct.App.1984) (post-conviction motion now covered by NMSA 1978, Crim.P.Rule 57 (Repl.Pamp. 1985) and previously covered by NMSA 1978, Section 31-11-6 (Repl.Pamp.1984) and NMSA 1978, Civ.P.Rule 93 (Repl.Pamp. 1980)).
Rule 57.1(a) allows the trial court to correct an illegal sentence at any time and to correct a sentence imposed in an illegal manner within the time provided for reduction of sentence. Rule 57.1(b) allows the trial court to reduce a sentence within thirty days of various events. In these cases, the only pertinent event is the imposition of the sentences. All defendants contend that their complaint about the denial of good-time credit resulted in an illegal sentence. Additionally, Aqui and Sena contend their complaint resulted in a sentence imposed in an illegal manner, or their complaint was otherwise cognizable under Rule 57.1(b). The state, relying on federal cases, contends that Rule 57.1 is inapplicable, that Rule 57 probably is not applicable, that habeas corpus is the proper remedy, and that whether or not Rule 57 is applicable does not matter because decisions on Rule 57 motions are not appealable. In order to understand the state's reliance on the federal cases, it is necessary to understand that our Rule 57.1 is comparable to Fed.R. Crim.P. 35. Both state and federal habeas corpus remedies exist, and our post-conviction relief provision (currently Rule 57) is comparable to 28 U.S.C.S. Section 2255 (1977), except that our Rule 57 has a provision barring appeals therefrom.
We agree with the state that the provision of Rule 57.1(a) dealing with illegal *779 sentences does not apply to these cases. The thrust of the federal cases is that there is a distinction between the validity of the sentence as written and the way it is administered by the corrections department. Only the former type of illegality may be raised on motion under the portion of Fed. R.Crim.P. 35(a) dealing with illegal sentences. See United States v. Carbo, 474 F.2d 698 (9th Cir.1973); Drew v. United States, 248 F.2d 75 (9th Cir.1957). Stated otherwise, there is a distinction between challenges to the sentence itself and challenges to the way the sentence is executed. See United States v. Gleason, 753 F.2d 83 (8th Cir.1985), and cases cited therein.
8A R. Cipes, Moore's Federal Practice, ¶¶ 35.01-.03 (Nov.1985 Revision) (Supp. 1985), extensively discusses Rule 35 and compares it to Section 2255. It points out that the portion of Rule 35 dealing with illegal sentences is directed toward sentences which exceed statutory authority, sentences which violate double jeopardy, and sentences which are internally contradictory or ambiguous. Motions pursuant to Rule 35(b) are essentially pleas for leniency. The portion of Rule 35(a) dealing with sentences imposed in an illegal manner goes to sentences which were imposed, for example, without allocution or based on erroneous information. Because our Rule 57.1 is substantially the same as Fed.R. Crim.P. 35 (see Committee commentary to Rule 57.1), federal interpretations of Rule 35 are persuasive. Cf. State v. Weddle.
Here, defendants' claims are not directed to the sentences themselves or to their validity as written. There is no claim that the sentences given were unauthorized by the statutes. See State v. Sinyard, 100 N.M. 694, 675 P.2d 426 (Ct.App.1983). All defendants received sentences within the statutory range, and all defendants expressly received the credit mandated by Section 31-20-12 in their judgments and sentences. Nor is there any claim of double jeopardy or that the sentences were internally inconsistent, ambiguous, or contradictory. Defendants' claims that the sentences are based on unconstitutional or unconstitutionally interpreted statutes and are, therefore, illegal, is unpersuasive. No authorities whatsoever are cited in support of these claims. See In re Adoption of Doe, 100 N.M. 764, 676 P.2d 1329 (1984). Because defendants' claims do not come within the framework set forth in the federal authorities for illegal sentences, their claims cannot be raised at any time under Rule 57.1(a). Accordingly, we must dismiss Gobel's appeal because her motion was filed beyond the thirty-day limit.
However, Aqui's and Sena's cases are different. They did file their motions sufficiently in advance of the thirty-day limit to have allowed the trial court to act within thirty days. Although Moore's, supra, states that motions under Fed.R.Crim.P. 35(b) are essentially pleas for leniency, it seems to treat motions seeking credit as motions to reduce sentence under paragraph (b). Id. at ¶ 35.02[3][b][v]. See also Taylor v. United States, 456 F.2d 1101 (5th Cir.1972). Giving defendants credit for good time spent in the jail in presentence confinement would reduce their sentences. We need not decide in these cases whether a motion seeking credit is properly brought under Rule 57.1(b), or under that portion of Rule 57.1(a) dealing with sentences imposed in an illegal manner. Both have the same thirty-day time limit and both Aqui's and Sena's motions were timely filed. Accordingly, we have jurisdiction of their appeals and answer their substantive contention on its merits.
The issue is whether it is constitutionally impermissible to deny these defendants good-time credit for time spent in jail in presentence confinement. Although we recognize that the authorities are not in agreement on this issue, compare People v. Turman, 659 P.2d 1368 (Colo.1983) (en banc); 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 (1985), with White v. Gilligan, 351 F.Supp. 1012 (S.D.Ohio 1972); People v. Sage, 26 Cal.3d 498, 165 Cal.Rptr. 280, 611 P.2d 874 (1980); State ex rel. James v. Stamps, 562 S.W.2d 354 (Mo. 1978) (en banc), we are persuaded that *780 these defendants should be entitled to good-time credit.
The state relies on McGinnis v. Royster, 410 U.S. 263, 93 S.Ct. 1055, 35 L.Ed.2d 282 (1973), and those cases following its analysis. McGinnis involved a challenge to a New York law which denied good-time credit toward parole eligibility for presentence jail confinement. The Court concluded that the equal protection challenge made should be judged using the rational basis test. The Court then stressed the existence of serious rehabilitative programs in prison and their absence in jail and ruled that such, together with the difficulty of evaluating prisoners' jail behavior, justified the disparity in treatment. New Mexico, however, has a complex set of credits for time served. In addition to the meritorious good-time credit at issue here, which is given based on good conduct, Section 33-2-34(A), there is: (1) support service good time, which is given to prisoners engaged in vocational education, other approved education, or facility support services, Id.; (2) industrial good time, which is given based on prisoners being engaged in an enterprise program, NMSA 1978, Section 33-8-14 (Repl.Pamp.1983); (3) extra industrial good time, which is given based on prisoners' performance in the enterprise program, Id.; and (4) extra meritorious good time, which is given for exceptional meritorious service or for performing duties of exceptional importance in connection with institutional operations, Section 33-2-34(B). Thus, in New Mexico, the credits for rehabilitation and special services are separate from credits for simple good behavior. None of the defendants in these cases argue that they are entitled to credits for anything other than simple good behavior. McGinnis and the cases relying on it are distinguishable. They are also distinguishable in that the New Mexico statutory scheme allows penitentiary officials to credit prisoners with good-time credit for time spent in federal or out-of-state confinement. Accordingly, the ability of penitentiary officials to observe the conduct of prisoners at the penitentiary does not provide a rational basis for not awarding good-time credit to pretrial detainees in New Mexico.
In spite of these distinctions, we do not believe that it is necessary to adopt one or another of the approaches utilized by the cases deciding the issue on strict equal protection grounds. That is because the doctrinal underpinnings of McGinnis have been undercut by a more recent case decided by the United States Supreme Court on an issue similar to this one. The issue involved disparity in criminal sentences where wealth is the reason for the disparity. See Wald, Pretrial Detention and Ultimate Freedom: A Statistical Study, 39 N.Y.U.L.Rev. 631 (1964) (poverty is main reason for pretrial detention).
Bearden v. Georgia, 461 U.S. 660, 103 S.Ct. 2064, 76 L.Ed.2d 221 (1983), held that a state could not revoke probation solely because of an indigent probationer's inability to pay probation costs. In explaining the appropriate analysis, the Court stated:
The parties, following the framework of Williams [ [v. Illinois, 399 U.S. 235, 90 S.Ct. 2018, 26 L.Ed.2d 586 (1970)] and Tate [v. Short, 401 U.S. 395, 91 S.Ct. 668, 28 L.Ed.2d 130 (1971)], have argued the question primarily in terms of equal protection, and debate vigorously whether strict scrutiny or rational basis is the appropriate standard of review. There is no doubt that the State has treated the petitioner differently from a person who did not fail to pay the imposed fine and there ore [sic] did not violate probation. To determine whether this differential treatment violates the Equal Protection Clause, one must determine whether, and under what circumstances, a defendant's indigent status may be considered in the decision whether to revoke probation. This is substantially similar to asking directly the due process question of whether and when it is fundamentally unfair or arbitrary for the State to revoke probation when an indigent is unable to pay the fine. Whether analyzed in terms of equal protection or due process, the issue cannot be resolved by resort to easy slogans or pigeonhole *781 analysis, but rather requires a careful inquiry into such factors as "the nature of the individual interest affected, the extent to which it is affected, the rationality of the connection between legislative means and purpose, [and] the existence of alternative means for effectuating the purpose * * *." Williams v. Illinois, supra, at 260 [90 S.Ct. at 2031] * * * (Harlan, J., concurring).
(Footnotes omitted.)
Defendants established below that they will be required to spend a longer time imprisoned because of their inabilities to afford bail. Because this case involves the same problemlonger periods of incarceration for indigentswhich was involved in Williams, Tate, and Bearden, the flexible due process approach used in Bearden is appropriate. Under this approach, the denial of good-time credit for presentence confinement cannot stand. Defendants' interest in liberty is substantial, and the impairment of that interest is significant. The state's interest in the maintenance of order at the penitentiary is also substantial. However, requiring the state to make good-time credit available for presentence confinement would in no way impair this interest. The award of good-time credit to both categories of prisoners is an alternative means of accomplishing the state's objective.
As the Missouri court ruled in State ex rel. James v. Stamps, "there is no legitimate reason for rewarding only a portion of those felons who comply [with good conduct standard with good time credits]. Fairness alone demands as much." Fairness is also at the heart of the due process clause of the New Mexico Constitution. See State v. Slayton, 90 N.M. 447, 564 P.2d 1329 (Ct.App.1977). The approach used in Bearden is appropriate here. Because the good-time credit is based solely on good conduct and because, under these circumstances, it is simply unfair to treat these defendants differently from those who can afford bail, we hold that these defendants must be given good-time credit for good conduct in presentence confinement.
The orders concerning Aqui and Sena are reversed and their cases are remanded to the trial court for determination of the amount of good-time credit to which they are entitled and entry of an appropriate order. The appeal of Gobel is dismissed.
IT IS SO ORDERED.
DONNELLY, C.J., and ALARID, J., concur.
