
209 N.J. Super. 37 (1986)
506 A.2d 1245
STATE OF NEW JERSEY, PLAINTIFF-RESPONDENT,
v.
FEDERICO R. FERNANDEZ, DEFENDANT-APPELLANT.
Superior Court of New Jersey, Appellate Division.
Submitted January 14, 1986.
Decided March 5, 1986.
*39 Before Judges MICHELS, GAULKIN and STERN.
Thomas S. Smith, Acting Public Defender, attorney for appellant (Meris L. Bergquist Designated Counsel, of counsel and on the letter brief).
Irwin I. Kimmelman, Attorney General of New Jersey, attorney for respondent (Debra L. Stone, Deputy Attorney General, of counsel and on the letter brief).
The opinion of the Court was delivered by MICHELS, P.J.A.D.
Defendant Federico R. Fernandez appeals from an order of the Law Division denying his petition for post-conviction relief.
Following plea negotiations, in December 1977, defendant pleaded guilty to (1) rape, a violation of N.J.S.A. 2A:138-1 (Third Count of Indictment No. 525-74-M); (2) rape while armed, a violation of N.J.S.A. 2A:138-1 and N.J.S.A. 2A:151-5; and (3) sodomy while armed, a violation of N.J.S.A. 2A:143-1 and N.J.S.A. 2A:151-5 (First and Second Counts of Indictment No. 95-77-S). The State, for its part of the plea agreement, recommended the dismissal of the remaining counts of both indictments.
In April 1978, defendant was sentenced to the Adult Diagnostic and Treatment Center in Avenel for indeterminate terms, not to exceed 30 years, for the two rape charges (Third Count of Indictment No. 525-74-M and First Count of Indictment No. 95-77-S), and to the State Prison in Trenton for 3 to 5 years for being armed while committing the rape, as charged in Indictment No. 95-77-S. These sentences were to run concurrently with each other. In addition, defendant was sentenced to Avenel for an indeterminate term, not to exceed 20 years, for sodomy (Second Count of Indictment No. 95-77-S) and to State *40 Prison for 3 to 5 years, for being armed while committing the sodomy. These sentences were to run concurrently with each other and also concurrently with the sentences imposed for the rape and the rape while armed charges in Indictment Nos. 525-74-M and 95-77-S.
In May 1983, defendant moved to be resentenced pursuant to the provisions of N.J.S.A. 2C:1-1d(2) of the New Jersey Code of Criminal Justice (Code). Defendant claimed that he qualified for a 10 year sentence reduction based upon "good cause." He specifically asserted that such resentencing was warranted to reduce the disparity in punishment between him and those who had been sentenced for similar crimes under the provisions of Title 2C. The resentencing panel, concluding that there was not the requisite good cause for resentencing under the Code, denied defendant's application.
Thereafter, in June 1983, defendant filed a petition for post-conviction relief pursuant to R. 3:22-1, alleging that because he was sentenced under the provisions of Title 2A, and therefore could not receive good time and work credits which those sentenced under Title 2C are able to receive, his right to equal protection had been violated. Defendant claimed that, under these circumstances, his sentences were illegal and, therefore, he should be resentenced to a determinate term so that he would be able to receive commutation time for good behavior and work performed. The trial court denied the motion because (1) defendant had not exhausted his right to appeal from the resentencing panel's decision under R. 3:22-3; and (2) the sentences were not violative of defendant's constitutionally guaranteed equal protection rights. This appeal followed.
Defendant now seeks an order granting him the right to earn commutation time for good behavior and work performed on the following grounds set forth in his brief:
POINT I N.J.S.A. 2C:1-1d(1) MANDATES THAT DEFENDANT, COMMITTED TO THE ADULT DIAGNOSTIC AND TREATMENT CENTER FOR AN INDETERMINATE THIRTY YEAR TERM, BE GIVEN THE OPPORTUNITY *41 TO EARN COMMUTATION CREDITS FOR GOOD BEHAVIOR AND WORK PERFORMED.
POINT II THE FAILURE TO PROVIDE DEFENDANT WITH THE SAME RIGHT TO EARN COMMUTATION CREDITS AS HAS BEEN CONFERRED, SINCE THE EFFECTIVE DATE OF THE CODE, ON THOSE INMATES SERVING SIMILAR SENTENCES FOR SIMILAR CRIMES DEPRIVES HIM OF HIS RIGHT TO EQUAL PROTECTION OF THE LAW UNDER THE FEDERAL AND STATE CONSTITUTIONS.
POINT III DEFENDANT WHO SEEKS TO CHALLENGE THE DENIAL OF THE OPPORTUNITY TO EARN COMMUTATION CREDITS FOR GOOD BEHAVIOR AND WORK PERFORMED PROPERLY SOUGHT A REMEDY BY WAY OF MOTION FOR POST CONVICTION RELIEF.
We have carefully considered these contentions and all of the arguments advanced by defendant in support of them and find that they are clearly without merit.[1]R. 2:11-3(e)(2). However, some further comment is necessary with respect to the arguments raised by defendant in Points I and II.

I.
In April 1978, defendant was sentenced to a 30 year indeterminate term at the Adult Diagnostic and Treatment Center at Avenel, pursuant to N.J.S.A. 2A:164-6 of the now repealed Sex Offender Act, N.J.S.A. 2A:164-3 et seq. This act specifically addressed the possibility of remission of sentence in N.J.S.A. 2A:164-10, which provided:

No statute relating to remission of sentence by way of commutation time for good behavior and for work performed shall apply to any such person committed pursuant to section 2A:164-6 of this title, but provision may be made for monetary compensation in [an] amount to be prescribed by the state board of control of institutions and agencies, in lieu of remission of sentence for work performed. [Emphasis supplied].
In August 1978, the Legislature enacted a comprehensive revision of the criminal laws of this State, known as the New Jersey Code of Criminal Justice (Code), N.J.S.A. 2C:1-1 et seq., *42 which was to be effective on September 1, 1979. Under the Code, the preexisting ban on the award of commutation credits contained in N.J.S.A. 2A:164-10, was reenacted in N.J.S.A. 2C:47-6. However, in August 1979, prior to the effective date of the Code, the Legislature expressly repealed this section. L. 1979, c. 178, § 147. Accordingly, on September 1, 1979 and at all times thereafter, there has been no statutory prohibition on the award of commutation time for good behavior and work performed in remission of a sentence imposed pursuant to Title 2C. Therefore, those who have been sentenced under the Code to Avenel are immediately eligible for work and good behavior credits. Savad v. Department of Corrections, 178 N.J. Super. 386, 392 (App.Div. 1981), certif. den., 87 N.J. 389 (1981).
The enactment of the Code further effected a major change by providing that sex offenders were to be sentenced to a specific term of years, rather than to an indeterminate term. N.J.S.A. 2C:47-3b now provides:
In the event that the court shall sentence a person as provided herein, the court shall notwithstanding set the sentence in accordance with Chapters 43 and 44 of this code.
Consequently, pursuant to Title 2C, a sex offender is now sentenced to a determinate term, just as inmates incarcerated in State prisons would be. Cf. N.J.S.A. 2A:164-3 et seq. (repealed L. 1978, c. 95, § 2C:98-2) (providing for indeterminate term for those sentenced pursuant to the Sex Offender Act). Defendant contends, therefore, that the prohibition against his earning commutation time for good behavior and work performed, which was contained within N.J.S.A. 2A:164-10, should no longer be applicable to him because of the express repeal of this provision in 1979. He argues that, pursuant to N.J.S.A. 2C:1-1d(1), the Code was meant to control the treatment of prisoners, such as him, who committed offenses and were sentenced prior to its effective date.
Generally, offenses committed and penalties incurred prior to the repeal of a legislative act are not affected by such repeal, "unless it is expressly declared in the act by which *43 such repeal or alteration is effectuated, that an offense [or]... penalty ... already committed or incurred shall be thereby discharged, released or affected...." N.J.S.A. 1:1-15 (Emphasis supplied). Moreover, by virtue of N.J.S.A. 2C:1-1b, "[e]xcept as provided in subsections c. and d. of this section, the code does not apply to offenses committed prior to its effective date and ... dispositions for such offenses shall be governed by the prior law, which is continued in effect for that purpose, as if this code were not in force." We conclude that N.J.S.A. 2C:1-1d(1) is not applicable in these circumstances and, therefore, prior law controls the issue of credits with respect to a sex offender not resentenced under the Code. In the case of the repeal of the Sex Offender Act and the enactment of the Code, however, the Legislature specifically provided:

The provisions of the code governing the treatment and the release or discharge of prisoners ... shall apply to persons under sentence for offenses committed prior to the effective date of the code, except that the minimum or maximum period of their detention or supervision shall in no case be increased. [N.J.S.A. 2C:1-1d(1) (Emphasis supplied)].
Defendant argues that denying him the opportunity to earn commutation credits for good behavior and work performed is one aspect of his overall "treatment" as a prisoner and, therefore, N.J.S.A. 2C:1-1d(1) should be applicable. In order to properly consider the validity of this argument it is necessary to understand the difference in legislative intent which prompted the enactment of the Sex Offender Act, N.J.S.A. 2A:164-3 et seq., since it is clear that the Legislature sharply modified the philosophy of this act in adopting the Code. State v. Chapman, 95 N.J. 582, 591 (1984).
Under the now repealed Sex Offender Act, the primary purpose of sentencing was rehabilitative. Defendants were to be released upon their completion of a successful course of treatment, N.J.S.A. 2A:164-8 (repealed L. 1978, c. 95, § 2C:98-2), and were not to be punished thereafter. State v. Chapman, supra, 95 N.J. at 591. See also State v. Clark, 65 N.J. 426, 435 (1974) (thesis of act is commitment for treatment instead of sentence for punishment); State v. Mickschutz, 101 N.J. Super. *44 315, 320 (App.Div. 1968) (philosophy of Sex Offender Act is that those who come within it require treatment, not punishment). The purpose of the Sex Offender Act, therefore, was clearly to cure the defendant. Accordingly, under this pre-Code act, "[a] sentence was required to be indeterminate subject to a maximum term not exceeding the maximum sentence imposable for the crime." Gerald v. Department of Corrections, 201 N.J. Super. 438, 445 (App.Div. 1985), certif. granted, 102 N.J. 352 (1985).
In contrast, N.J.S.A. 2C:47-3b requires the imposition of determinate sentences on sex offenders in accordance with the Code's general sentencing provisions. State v. Chapman, supra, 95 N.J. at 592; Gerald v. Department of Corrections, supra, 201 N.J. Super. at 446. Therefore, the Code recognizes that sex offenders should be treated for their psychological problems and punished for their wrongful acts. In enacting the Code, the Legislature "empowered the sentencing court to consider not only the rehabilitation of the sex offender but also the punishment of the offender and the protection of the public when imposing an Avenel sentence." State v. Chapman, 189 N.J. Super. 379, 401-402 (App.Div. 1983) (Michels, P.J.A.D., dissenting), rev'd on dissent, 95 N.J. 592 (1984). See also Gerald v. Department of Corrections, supra, 201 N.J. Super. at 445 (Code added punitive component to exclusively rehabilitative and treatment purposes of original Sex Offender Act).
In Savad v. Department of Corrections, supra, we considered whether defendants sentenced under the repealed Sex Offender Act, N.J.S.A. 2A:164-3 et seq., were eligible for work and good behavior credits pursuant to N.J.S.A. 30:4-92 and N.J.S.A. 30:4-140. In reaching our determination, we viewed the bar against commutation credits contained within N.J.S.A. 2A:164-10 (repealed L. 1978, c. 95, § 2C:98-2) as integral to pre-Code sex offender sentences, since it assured that there would be special confinement and treatment benefiting both society and the offenders, "until satisfactory rehabilitation and social adjustment, but, in no event, beyond the statutory maximum." *45 178 N.J. Super. at 390. Reviewing the legislative policy underlying the repealed act, we noted:

Progress through treatment and therapy to an acceptable social adjustment was the legislative goal of the repealed Sex Offender Act. Upon satisfactory rehabilitation from their aberrations pre-Code sex offenders ... were immediately eligible for parole. At the other extreme, their maximums were those fixed by law for the crimes of which they were convicted. [Ibid. (Emphasis supplied)].
We concluded in Savad that, where an individual continues to serve a commitment imposed under the Sex Offender Act, his sentence should not be modified by the granting of eligibility for commutation credits. Id. at 391. Accord Attorney General Formal Opinion No. 11-1980, 106 N.J.L.J. 118 (1980). Writing for the court in Savad, Judge Furman emphasized that "[t]he enactment and taking effect of the Code did not, in itself, reduce or otherwise affect pre-Code sentences," 178 N.J. Super. at 391, although pre-Code sentences may be reduced upon a showing of disparity and good cause. N.J.S.A. 2C:1-1d(2). Since a defendant who continues to serve a sentence under the Sex Offender Act, after September 1, 1979, may not automatically have his maximum term reduced, it logically follows that the Code may not operate to similarly modify his sentence by the granting of commutation credits pursuant to N.J.S.A. 30:4-92 and N.J.S.A. 30:4-140. Savad v. Department of Corrections, supra, 178 N.J. Super. at 391. He continues to serve an indeterminate sentence, unlike a defendant sentenced under the Code.
Furthermore, at the time of the imposition of defendant's sentence, there existed an express prohibition on the award of commutation credits to sex offenders within the now appealed N.J.S.A. 2A:164-10. An award of these credits to defendant, at this time, would not be in furtherance of the legislative purpose which underlay the provision of these credits to inmates who were sentenced to a specific minimum and maximum term of years. As recognized by this court in Torres v. Wagner, 121 N.J. Super. 457 (App.Div. 1972):

*46 The granting or forfeiture of commutation credits . .. requires the exercise of judgment by the State Prison authorities based upon their observation and evaluation of the prisoner's conduct.... [Id. at 460].
Therefore, it would not be consistent with the clear legislative intent for this court to allow the award of commutation credits "for a period of time during which state prison officials were not authorized to credit inmates with time for good behavior." Attorney General Formal Opinion No. 11-1980, 106 N.J.L.J. 118, 139 (1980).
Even if we were to accept defendant's argument that denying a prisoner the opportunity to earn commutation credits for good behavior and work performed is an aspect of prisoner "treatment", a careful reading of N.J.S.A. 2C:1-1d(1) indicates that he still would not be entitled to relief. The statute upon which defendant relies clearly states that "[t]he provisions of the code governing the treatment and the release or discharge of prisoners" are applicable to persons sentenced for pre-Code offenses. N.J.S.A. 2C:1-1d(1) (Emphasis supplied). Therefore, even if the granting of work or good behavior commutation credits were considered to fall within the ambit of prisoner "treatment", the Code itself does not provide in any way for such credits.
Provisions governing the granting of such credits are contained within N.J.S.A. 30:4-92 and N.J.S.A. 30:4-140 which concern the granting of parole. These provisions existed prior to the enactment of the Code and were not amended by its adoption. The Code itself does not contain any provision governing work or good behavior commutation credits which could be applied to sex offenders sentenced for offenses committed prior to its effective date. Attorney General Formal Opinion 11-1980 n. 2, 106 N.J.L.J. 118, 139 (1980). Cf. Gerald v. Department of Corrections, supra, 201 N.J. Super. at 448 (N.J.S.A. 2C:1-1d(1) held applicable to pre-Code defendant sentenced under Sex Offender Act and transferred to regular prison facility, where a Code provision, N.J.S.A. 2C:43-9, clearly established *47 that parole was to be governed by the Parole Act of 1979, N.J.S.A. 30:4-123.34 et seq.).
Accordingly, N.J.S.A. 2C:1-1d(1) does not mandate that defendant be given the opportunity to earn commutation credits for either good behavior or work performed.

II.
We are also satisfied that the trial court properly concluded that defendant has not been denied equal protection of the law because he is being treated differently than sex offenders who have been committed to Avenel under the Code.
The Fourteenth Amendment of the United States Constitution provides that a state may not "deny to any person within its jurisdiction the equal protection of the laws." This amendment requires that "all individuals, including state prisoners, similarly situated be similarly treated." Hluchan v. Fauver, 480 F. Supp. 103, 109 (D.N.J. 1979). Although the New Jersey Constitution does not contain a specific equal protection clause analogous to that found in the Fourteenth Amendment of the United States Constitution, Article I, paragraph 1 of the State Constitution is most frequently cited as the source of equal protection guarantees. Peper v. Princeton Board of Trustees, 77 N.J. 55, 79 (1978).
The United States Supreme Court has taken the following position with respect to constitutional challenges to statutory mandates:
State laws are generally entitled to a presumption of validity against attack under the Equal Protection Clause. (Citation omitted). Legislatures have wide discretion in passing laws that have the inevitable effect of treating some people differently from others, and legislative classifications are valid unless they bear no rational relationship to a permissible state objective. (Citations omitted).
Not all legislation, however, is entitled to the same presumption of validity. The presumption is not present when a State has enacted legislation whose purpose or effect is to create classes based upon racial criteria, since racial classifications, in a constitutional sense, are inherently "suspect." (Citations omitted). And the presumption of statutory validity may also be undermined *48 when a State has enacted legislation creating classes based upon certain other immutable human attributes. (Citations omitted).

In the absence of invidious discrimination, however, a court is not free under the aegis of the Equal Protection Clause to substitute its judgment for the will of the people of a State as expressed in the laws passed by their popularly elected legislatures. [Parham v. Hughes, 441 U.S. 347, 351, 99 S.Ct. 1742, 1745, 60 L.Ed.2d 269, 274 (1979) (Emphasis supplied)].
In addition, to decide whether a law is violative of equal protection rights, the following factors must be considered:
the character of the classification in question; the individual interests affected by the classification; and the governmental interests asserted in support of the classification. [Dunn v. Blumstein, 405 U.S. 330, 335, 92 S.Ct. 995, 999, 31 L.Ed.2d 274, 280 (1972)].
Constitutional principles of equal protection do not mandate that all persons be treated identically. They require only that differences in treatment be justified by an appropriate state interest. State v. Krol, 68 N.J. 236, 253 (1975); Trantino v. Department of Corrections, 168 N.J. Super. 220, 227 (App. Div. 1979), certif. den., 81 N.J. 338 (1979); Torres v. Wagner, supra, 121 N.J. Super. at 459. Under a two-tiered analysis of equal protection, the State need only show a rational basis for a disparity in treatment, see, e.g., Mahoney v. Parole Board of New Jersey, 10 N.J. 269, 278 (1952), appeal dism., 344 U.S. 871, 73 S.Ct. 173, 97 L.Ed. 675 (1952), unless it involves invidious discrimination or impinges upon fundamental rights. In such cases, a compelling state interest must be shown. State v. Krol, supra, 68 N.J. at 253. See also Hluchan v. Fauver, supra, 480 F. Supp. at 109 (Although prison inmates are entitled to equal protection of the law, their treatment is not subject to strict judicial scrutiny in the absence of impingement on fundamental rights or imposition of a suspect classification).
In State v. Wingler, 25 N.J. 161 (1957) the constitutionality of the Sex Offender Act, N.J.S.A. 2A:164-3 et seq., was expressly upheld by our Supreme Court. There defendant contended that the act denied him equal protection because other prisoners who were convicted of the same sex crimes, but were not committed under the same statute, were entitled to commutation time for good behavior and work credits. The Supreme *49 Court found that there was "sufficient cause" for the Legislature to classify repetitive and compulsive sex offenders within a special group, thereby recognizing the constitutional power of the Legislature to make reasonable classifications of criminals for purposes of sentence and release. 25 N.J. at 175. See also Hluchan v. Fauver, supra, 480 F. Supp. at 109 ("There may well be a rational basis for treating sex offenders differently than other prisoners.").
In Trantino v. Department of Corrections, supra, 168 N.J. Super. at 226, we held that the denial of work credits towards parole eligibility for time spent on death row by prisoners whose capital sentences were commuted to life imprisonment did not violate the constitutional guarantee of equal protection. In reaching this decision we found "no merit in the claim that this work credit policy `created an arbitrary distinction which is not founded upon a substantial state interest between prisoners who were sentenced to life imprisonment on a particular day and prisoners whose death sentences were commuted to life imprisonment as of that same day.'" Id. at 226-227.
In State v. Smith, 190 N.J. Super. 21, 23-24 (App.Div. 1982), certif. den., 96 N.J. 319 (1984) we further held that a defendant did not have a constitutional right to be resentenced because of the disparity which existed between the 30 year sentence, which he was serving for rape under the Sex Offender Act, and the 20 year maximum under the Code, for the congruent offense of aggravated sexual assault, to which others were committed. Accordingly, we have clearly recognized that "differing treatment of prior offenders does not generate any inference of constitutional deprivation." 190 N.J. Super. at 24.
In Frazier v. Manson, 703 F.2d 30 (2d Cir.1983), cert. den., 464 U.S. 934, 104 S.Ct. 339, 78 L.Ed.2d 308 (1983), a federal court considered whether a Connecticut statute which increased the good time credit per year for inmates sentenced on or after October 1, 1976, discriminated against prisoners sentenced prior to that date, in violation of the Equal Protection Clause of the *50 Fourteenth Amendment. The effect of this statute was to subject two persons, convicted of the same offense and sentenced to the same maximum term, to different periods of incarceration. 703 F.2d at 33.
Appellants in Frazier argued that, since good time credits affected the length of incarceration, they impinged upon a protected liberty interest and, therefore, should be analyzed under a strict scrutiny standard which would require a compelling state interest to sustain them. Id. at 33-34. The Circuit Court disagreed, relying on McGinnis v. Royster, 410 U.S. 263, 93 S.Ct. 1055, 35 L.Ed.2d 282 (1973) (constitutionality of bestowing good time credits on some prisoners, but not on others, required only some rational basis). Although the awarding of good time credits may affect the length of incarceration, thereby implicating a protected liberty interest, the Frazier Court found that the State's equally important interests, may militate against a compelling necessity test. 703 F.2d at 34. But cf. Bolling v. Manson, 345 F. Supp. 48 (D.Conn. 1972) (District Court failed to find that there was compelling state interest for disparity in treatment with respect to good time credits awarded to reformatory inmates serving definite as distinguished from indefinite sentences and, therefore, concluded that statute was unconstitutional).
Here, we are satisfied that defendant has failed to meet his burden of establishing that similarly situated individuals are being treated dissimilarly. He is not a member of the same class, nor is he similarly situated to persons serving determinate sentences under the Code. Defendant continues to serve an indeterminate term, pursuant to the provisions of the now repealed Sex Offender Act, N.J.S.A. 2A:164-3 et seq. Under the terms of that act, defendant is eligible for release under parole supervision at any time, upon recommendation of a special classification of the Review Board that he is "capable of making an acceptable social adjustment in the community." N.J.S.A. 2A:164-8 (repealed L. 1978, c. 95, § 2C:98-2). However, sex offenders sentenced to determinate terms under the *51 Code are eligible for release only in accordance with the Parole Act of 1979. See N.J.S.A. 2C:43-9. Consequently, with respect to the matters of early release, the disparity in entitlement to commutation credits for good behavior and work performed is plainly not among members of the same class.
Finally, even if we were to make the assumption that defendant has made a threshold showing that there is disparate treatment among members of the same class, we have no hesitancy in concluding that it was reasonable for the Legislature to refuse to award such commutation credits to defendant, since such credits could be used to initiate release before satisfactory rehabilitation and social adjustment has been made. The granting of good time and work credits would undoubtedly undercut the legislative goals of rehabilitation and treatment underlying the Sex Offender Act. In our view, the bar against commutation time for good behavior and work performed is an integral part of defendant's indeterminate sentence under Title 2A. See Savad v. Department of Corrections, supra, 178 N.J. Super. at 390. Thus, there is a rational basis to distinguish him from sex offenders committed to determinate sentences under the Code.
Affirmed.
NOTES
[1]  By considering the merits of the issues raised by this appeal we are not deciding whether the subject is cognizable by petition for post-conviction relief, pursuant to R. 3:22-2. See State v. Clark, 54 N.J. 25 (1969); Johnson v. N.J.State Parole Board, 131 N.J. Super. 513 (App.Div. 1974), certif. den., 67 N.J. 94 (1975).
