
88 Ill. App.3d 352 (1980)
410 N.E.2d 511
BERNELL HAMPTON, Plaintiff-Appellant,
v.
CHARLES J. ROWE, Director, The Department of Corrections, Defendant-Appellee.
No. 79-105.
Illinois Appellate Court  Third District.
Opinion filed September 8, 1980.
Robert Agostinelli and Verlin R.F. Meinz, both of State Appellate Defender's Office, of Ottawa, for appellant.
*353 Edward Petka, State's Attorney, of Joliet, and Charles W. Pulliam, of Department of Corrections, for appellee.
Reversed and remanded.
Mr. JUSTICE BARRY delivered the opinion of the court:
This is an appeal by Bernell J. Hampton from the denial of his petition for writ of mandamus against Charles J. Rowe, the Director of the Illinois Department of Corrections, by the Circuit Court of Will County. Hampton sought to compel the Department of Corrections to credit him with compensatory good time for his preconviction jail time served in the Cook County jail.
Only one issue is presented for review:
Whether the distinction drawn by Department of Corrections Regulation 866 regarding compensatory good time  a distinction between persons serving sentence in a penitentiary after conviction and those serving sentence in a county jail prior to conviction (because of an inability to make bond)  is totally irrational and thus denies equal protection of the law.
Plaintiff-appellant, Bernell Hampton, was arrested by authorities in Cook County, Illinois, on October 24, 1972, on a charge of murder. Bond was at first not set. It was set thereafter, but, because of his indigency, plaintiff was unable to post the amount specified. As a consequence, plaintiff remained incarcerated up to and through his first trial on the murder charge in June of 1974 (a trial resulting in a mistrial) and up to and through his second trial on that charge in January of 1975. He was convicted of murder following that second trial and sentenced to a term of 18 to 36 years in the penitentiary. He left the Cook County jail in June of 1975 and was transported to the Department of Corrections.
In sentencing the plaintiff on the murder conviction, the trial judge credited him with the time served in the Cook County jail. Plaintiff thus arrived at the penitentiary with credit for over 30 months of pretransfer jail time. Some time after arriving at the penitentiary, the plaintiff petitioned the Department of Corrections for compensatory good-time credit for this period of imprisonment in the county jail. Citing Administrative Regulation 866 and the fact that the regulation gives compensatory credit only to persons serving sentence in a State institution, the Department refused the credit.
On February 2, 1978, the plaintiff filed a petition for writ of mandamus in the Circuit Court of the Twelfth Judicial Circuit, Will County. The petition set forth the facts noted above regarding plaintiff's arrest, conviction and sentence and regarding the denial of compensatory credit for time spent in the county jail. The petition alleged that the application of Regulation 866 to preclude such credit amounted to a denial of equal protection of the law. Counsel was thereafter appointed to *354 represent Hampton, and an amended petition for writ of mandamus was filed which restated Hampton's claim of a denial of equal protection and added another count which has not been argued on appeal.
Following a hearing and consideration of several motions, responses, and memoranda of law the trial court entered judgment denying both counts of Hampton's petition for writ of mandamus. Specifically the court held that Regulation 866 did not deny Hampton equal protection of the law.
 1 The equal protection guarantees in both the Federal and Illinois constitutions require that State regulations and legislation accord similar treatment to persons similarly situated. (U.S. Constitution, amend. XIV; Ill. Const., art. 1, § 2.) The heart of Hampton's argument is that because he was unable, financially, to furnish bail bond and remained incarcerated awaiting trial he was denied compensatory good time credit of 218.5 days by virtue of Department of Correction's Administration Regulation No. 866. His contention of a violation of his equal protection rights is then based upon the more lenient treatment available to a wealthy defendant able to make bail bond, or one allowed out on personal recognizance, i.e., who is not incarcerated prior to his conviction and consequently may begin receiving compensatory good time from day one of his confinement in some facility of the Illinois Department of Corrections.
As aforesaid Hampton received credit for his pretrial incarceration served in the Cook County jail. (Ill. Rev. Stat. 1977, ch. 38, par. 1005-8-7(b).) He also received credit for "statutory good time" pursuant to Department of Corrections Administration Regulation 813. The policy set forth in Department Regulation 813 is to provide for the awarding, revocation or restoration of statutory good time, pursuant to section 3-6-3 of the Unified Code of Corrections (Ill. Rev. Stat., ch. 38, par. 1003-6-3), as revised effective October 1, 1975, for individuals not serving a determinate sentence under the provisions of Public Act 80-1099. The corresponding policy of Department Regulation 866 originally provided that it was the policy of the Department to award compensatory good time credit to all residents who are performing work assignments or participating in other education, vocational and therapeutic programs at correctional or community correctional centers in the State of Illinois and who are not serving a determinate sentence pursuant to the provisions of Public Act 80-1099. However, on September 1, 1975, the Department altered Regulation 866 because there were not enough jobs or programs available to accommodate those who sought "compensatory good time." The altered version of Regulation 866 provided that "compensatory good time" would be available to all inmates within the Department of Corrections and was given retroactive effect to January 1, 1973. Hence, the only present difference between *355 "statutory good time" pursuant to Department Regulation 813 and the "compensatory good time" sought by Hampton is the amount and method of computation. The amount of credit is of course important to this plaintiff.
 2, 3 Absent the existence of a classification which is inherently suspect or the infringement of a fundamental right, distinctions drawn by a State governmental unit in determining the application of a particular policy must be rationally related to the furtherance of a legitimate governmental interest to comply with the requirements of equal protection. (People ex rel. Tucker v. Kotsos (1977), 68 Ill.2d 88, 368 N.E.2d 903.) Accordingly, the standard for review of the alleged equal protection violation in the present case is the rational basis test. "Under the rational relationship analysis, once a discriminatory classification is shown, the court must then (1) look to the purposes behind the legislative scheme at issue, and (2) determine whether the classification bears a rational relationship to a legitimate legislative purpose." (People v. Miles (1977), 53 Ill. App.3d 137, 142, 368 N.E.2d 187, 190.) The facts recited above very clearly set forth a discriminatory classification in that Hampton was treated significantly differently because of his pretrial detention as opposed to the convicted felon who was free on bail until beginning to serve his sentence of imprisonment in a facility of the Illinois Department of Corrections.
The succinct issue before us is whether that classification bears a rational relationship to a legitimate legislative purpose. We believe that it does not.
The defendant, Director of the Illinois Department of Corrections, relies upon the case of McGinnis v. Royster (1973), 410 U.S. 263, 35 L.Ed.2d 282, 93 S.Ct. 1055, for upholding the discriminatory treatment of Hampton because it allegedly satisfies the rational basis test. McGinnis is distinguishable. Although the Supreme Court upheld a statute challenged on equal protection grounds which accorded no good time credit for preconviction county jail time served, the court recited that the New York statute allowed the complaining prisoners to elect the new procedure and thus lessen the disadvantage which was the basis of the claimed equal protection violation. Another distinction is the clear holding in McGinnis that the denial of good time credit for presentence jail time was rationally justified on the ground of the lack of rehabilitation programs available during presentence detention and that good time credit was correlated to rehabilitative programs.
In the case at bar compensatory good time is no longer correlated to rehabilitation or satisfactory performance of work assignments, but is available to all prisoners within the Department. For this reason the McGinnis case does not support the Director's position.
The Director's brief asserts that compensatory good time is an *356 administrative control upon the inmate population over which the Department of Corrections has jurisdiction. The rational basis for not according it to Hampton is that in his presentence detention in the county jail he was not subject to the jurisdiction of the Department of Corrections. The scheme of perpetuating discipline within the facilities of the Department of Corrections would not, in our opinion, form a rational basis for discrimination.
Illustrative of the discrimination and that it is a violation of Hampton's equal protection rights are three comparable statutes: (1) the Misdemeanant Good Behavior Allowance Act (Ill. Rev. Stat. 1977, ch. 75, par. 30 et seq.) as implemented in Department Regulation 859; (2) the statutory good time credit provisions as implemented through Department Regulation 813; and (3) the day-for-day good time credit provisions of section 3-6-3 of the Unified Code of Corrections (Ill. Rev. Stat., 1978 Supp., ch. 38, par. 1003-6-3). Each of these three good time crediting provisions makes no distinction because of the site of the prisoners' incarceration. Credit is available under all three provisions to a prisoner either before or after conviction for time served in a county jail. The alleged rational basis asserted for making a distinction with regard to compensatory good time credit for Hampton is less than sufficient and violates his equal protection rights.
Similar results have been reached in other jurisdictions upon identical facts. In People v. Brown (1979), 90 Cal. App.3d 985, 153 Cal. Rptr. 762, the court held that denying a detainee-felon good time credit for the time period he served in the county jail prior to his sentence while granting good time credit to an individual who is able to make bail and then begin serving jail time only after his conviction violates equal protection. (Accord, People v. Sage (1980), 26 Cal.3d 498, 611 P.2d 874, 165 Cal. Rptr. 280.) Distinguishing the Supreme Court case of McGinnis v. Royster, the Supreme Court of Missouri held that equal protection requires that felons confined elsewhere than in the State Department of Corrections receive the same rights and benefits with respect to good time credit as those serving sentences with the State Department of Corrections. (State ex rel. James v. Stamps (Mo. 1978), 562 S.W.2d 354.) We agree with the reasoning and the result reached in those cases.
As aforesaid the Director specifically claims that the Department has no jurisdiction over persons like Hampton in pretrial confinement. However, the Department has granted Hampton, and many others so situated, credit for time served in custody prior to trial without asserting a lack of jurisdiction. (Ill. Rev. Stat. 1975, ch. 38, par. 1005-8-7(b); People v. Pugh (1977), 49 Ill. App.3d 174, 363 N.E.2d 1212.) We believe the argument is without merit.
*357 The Director also claims that no adequate basis exists for the Department to determine whether Hampton served "good time" while in pretrial detention and that the reports received by the Department from the authorities of the county jails are not reliable. The legislature expressly provided avenues for the exchange of information concerning a prisoner's pretrial confinement. Section 3-8-1 of the Unified Code of Corrections (Ill. Rev. Stat. 1977, ch. 38, par. 1003-8-1) provides for the procedure of the Department of Corrections in receiving prisoners from other confinement facilities and specifically requires the sheriff of a county to provide the Department with a record of the prisoner's time served, his behavior and his conduct while in the custody of the sheriff. Section 5-4-1 of the Code (Ill. Rev. Stat. 1975, ch. 38, par. 1005-4-1) includes authority for the State's Attorney to supply additional factual information with which to aid the Department. Further section 5-4-1(e)(4) of the Code (Ill. Rev. Stat., 1978 Supp., ch. 38, par. 1005-4-1(e)(4)) specifically requires sheriffs to relay detailed similar information to the clerk of the court at the sentencing hearing for delivery to the Department. The intent of the legislature is clear. Available means were established to afford a transfer of information of pretrial confinement to the Department of Corrections obviously with the authority to rely upon such information. The arguments of the Director are weak attempts at justifying an arbitrary classification which violates Hampton's right to equal protection of the law.
For the reasons stated the judgment of the Circuit Court of Will County is reversed and the cause is remanded with directions that a writ of mandamus issue requiring the Illinois Department of Corrections to credit Bernell Hampton with 218.5 days compensatory good time credit for the time he served prior to conviction in the Cook County jail.
Reversed and remanded with directions.
SCOTT and STOUDER, JJ., concur.
