
71 Ill. App.3d 585 (1979)
390 N.E.2d 93
THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff,
v.
PHILLIP ZAHN, Defendant-Appellee.  THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff,
v.
ROBERT AIKENS, Defendant-Appellee.  (THE DEPARTMENT OF MENTAL HEALTH AND DEVELOPMENTAL DISABILITIES, Appellant.)
Nos. 78-213, 78-418 cons.
Illinois Appellate Court  First District (4th Division).
Opinion filed April 26, 1979.
William J. Scott, Attorney General, of Chicago, and Barbara A. Weiner, of Department of Mental Health & Developmental Disabilities (Alan Grischke, Special Assistant Attorney General, of counsel), for appellant.
James J. Doherty, Public Defender, of Chicago (Marc Fogelberg, Assistant Public Defender, of counsel), for appellee.
Judgment reversed.
*586 Mr. PRESIDING JUSTICE JIGANTI delivered the opinion of the court:
The Illinois Department of Mental Health and Developmental Disabilities (DMH) appeals from orders entered by the circuit court of Cook County finding Phillip Zahn and Robert Aikens to be in need of mental treatment (Ill. Rev. Stat. 1977, ch. 91 1/2, par. 9-4), and committing them to the DMH for treatment while awaiting trial. Both defendants, charged with murder in unrelated cases, were found fit to stand trial on those charges. (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-1), and were incarcerated in the Cook County Jail.
The DMH argues that under the Mental Health Code the trial court had no jurisdiction to commit persons charged with a felony to the DMH for treatment while awaiting trial. Section 2-1 of the Mental Health Code of 1967 provides:
"Jurisdiction. The circuit courts have jurisdiction under this Act over persons not charged with a felony who are in need of mental treatment * * *." (Emphasis added.) (Ill. Rev. Stat. 1977, ch. 91 1/2, par. 2-1.)
The defendants concede that the circuit court did not have authority under section 2-1 to commit them to the DMH for treatment pending their trials, but they ask us to affirm the trial court on the basis of that court's finding that section 2-1 unconstitutionally denies persons like the defendants the equal protection of the laws, as guaranteed by the fourteenth amendment to the United States Constitution. The only issue we need address is the constitutionality of that section.
The defendants argue that section 2-1 arbitrarily classifies them in such a manner as to deny them the benefit of the superior treatment facilities of the DMH while they await trial. Accordingly, the defendants argue section 2-1 creates two classes: (1) mentally ill persons charged with a felony who are treated by the DMH and (2) mentally ill persons charged with a felony who are excluded from treatment by the DMH. The former category includes (1) persons charged with a felony but adjudicated unfit to stand trial who are committed to the DMH (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-2 (a)); (2) persons charged with a felony who have been adjudicated unfit to stand trial, released on bond, and subsequently treated by the DMH as voluntary patients (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-2(a) and ch. 91 1/2, par. 4-1, 5-1); (3) persons charged with a felony who have been adjudicated fit for trial, released on bond, and are treated in the DMH as voluntary patients before their trials (Ill. Rev. Stat. 1977, ch. 38, par. 1005-2-2(a) and ch. 91 1/2, par. 4-1, 5-1); (4) persons acquitted of felonies by reason of insanity, found to be in need of mental treatment, and involuntarily committed to the DMH (Ill. *587 Rev. Stat. 1977, ch. 38, par. 1005-2-4(a)); and (5) persons convicted of a felony who are transferred from the penitentiary to the DMH (Ill. Rev. Stat. 1977, ch. 38, par. 1003-8-5(a)). Those excluded from treatment in the DMH include only persons who, like the defendants, have either been denied bail or who are unable or unwilling to make bail. The defendants submit that there is no rational basis for these classifications and that they consequently have been denied their rights to equal protection because the DMH facilities and treatment are superior to those available at the Cook County Jail.
The trial court held a hearing concerning the treatment conditions at the Cook County Jail where criminal defendants are held pending trial. Two witnesses were called by the DMH: Ronald Simon, coordinator of the Cook County Jail's outpatient psychiatric program and Joseph Martens, an administrator at the DMH, who is responsible for monitoring the jail and other outpatient clinics. The Cook County Jail's program includes a 52-bed dormitory and 22 inpatient beds. The modes of treatment available at the jail include milieu therapy, chemotherapy, group therapy, individual therapy, and activities. An individualized treatment plan is developed for each member; individual counseling is provided daily and group therapy at least every other day. The program employs 12 professionals in addition to three part-time psychiatrists. In Simon's opinion, the program is understaffed and the facilities overcrowded, but the program is nevertheless effective.
Martens is familiar with the psychiatric program at the jail and also with the inpatient facilities of DMH, and testified that the same types of therapy are available at each location. Martens believes that the jail is inadequately staffed and that the conditions at the DMH facilities are clearly superior. Martens also testified that the DMH facility designated for persons charged with a felony or in need of maximum security is Chester Mental Health Center, located approximately 350 miles from Chicago.
The defendants rely exclusively on Baxstrom v. Herold (1966), 383 U.S. 107, 15 L.Ed.2d 620, 86 S.Ct. 760, in urging that the judgment of the circuit court be affirmed. In Baxstrom, the petitioner was certified insane while serving a sentence for an assault conviction, and subsequently transferred from the State prison to Dannemora, an institution under the jurisdiction of the New York Department of Correction. Dannemora was used for prisoners declared mentally ill while serving their sentences. At the expiration of his sentence, the petitioner was civilly committed to Dannemora without being granted the right to a jury trial on the question of his present insanity and without any hearing to determine whether he was presently dangerous, rights to which other New York residents were *588 entitled. The court noted "where, as here, the State has created functionally distinct institutions, classification of patients for involuntary commitment to one of these institutions may not be wholly arbitrary." (Baxstrom, 383 U.S. 107, 114, 15 L.Ed.2d 620, 625, 86 S.Ct. 760, 764.) From this, the defendants argue the classifications involved in the instant cause are similarly arbitrary and must be struck down.
We do not find Baxstrom controlling on the issue before us. In Baxstrom, the defendant had already served his prison sentence, unlike the defendants before us now. When Baxstrom's penal sentence expired, custody over him shifted from the Department of Correction to the Department of Mental Hygiene, but the State officials continued to confine him in a Department of Correction facility without affording to him the procedural protections which are given to other New York citizens. In our case the defendants do not make any complaint of denial of their rights to commitment procedures afforded to other persons. Their argument, rather, is that they should be entitled to access to the facilities of the DMH while awaiting trial.
 1 In People ex rel. Tucker v. Kotsos (1977), 68 Ill.2d 88, 368 N.E.2d 903, our supreme court discussed the role of an appellate court in considering a claim of denial of equal protection:
"The determination of whether a given legislative classification denies persons the equal protection of the laws is an extremely sensitive area of judicial review. It requires judges to `second guess' the judgment of legislators, with very little textual constitutional basis to rely upon in their analysis. [Citation.] In the vast majority of cases, the courts restrict their role to determining whether the particular legislative classification is rationally designed to further a legitimate State purpose. [Citations.] It is only to protect fundamental constitutional rights [citations] and to protect members of `suspect classes,' * * * that the courts go beyond their generally deferential analysis of legislative classifications." (Kotsos, 68 Ill.2d 88, 96-97, 368 N.E.2d 903, 907.)
The defendants here make no claim of denial of a fundamental constitutional right. Nor do they claim that they belong to a suspect class. Hence, the question we must answer is whether the legislative classifications under consideration are rationally designed to further a legitimate State purpose.
 2 While the right to legislate implies the right to classify (Martin v. City of Struthers (1943), 319 U.S. 141, 154, 87 L.Ed. 1313, 1321, 63 S.Ct. 862, 868 (Frankfurter, J., dissenting)), the equal protection clause limits this right to the extent that the classification must be reasonably related to a permissible State purpose. (Reed v. Reed (1971), 404 U.S. 71, 30 L.Ed.2d 225, 92 S.Ct. 251.) In McGowan v. Maryland (1961), 366 U.S. 420, 6 L. *589 Ed.2d 393, 81 S.Ct. 1101, the court explained that "[s]tate legislatures are presumed to have acted within their constitutional power despite the fact that, in practice, their laws result in some inequality. A statutory discrimination will not be set aside if any state of facts reasonably may be conceived to justify it." 366 U.S. 420, 425-26, 6 L.Ed.2d 393, 399, 81 S.Ct. 1101, 1105.
With this background in mind, our task is to determine whether the classifications before us, which we will accept as the defendant posits them, are rationally designed to further a legitimate State purpose. It is within the police powers of the State to promulgate bodies of statutory law establishing and regulating both its criminal justice system and its mental health programs. (Meegan v. Village of Tinley Park (1972), 52 Ill.2d 354, 288 N.E.2d 423.) In some situations, as with these defendants, certain persons appear to come under the authority of both of them. When a person is charged with a felony he comes within the authority of the criminal justice system of the State. If such a person is subsequently found to be in need of mental treatment, and yet fit to stand trial, a determination must be made as to whether that person shall remain under the authority of the criminal justice system, or, alternatively, be transferred to the jurisdiction of the mental health system. The legislature has spoken on the subject in section 2-1 of the Mental Health Code where it has specified that persons in the defendants' position, although coming under the jurisdiction of the DMH, will remain under the jurisdiction of the criminal justice system while awaiting trial.
The other categories of mentally ill persons charged with a felony who are treated by the DMH do not overlap the jurisdictions of the two systems as do the defendants. Those who have been adjudicated unfit to stand trial are, at least for the time being, removed from jurisdiction of the criminal justice system and may come under the authority of the mental health system either as voluntary or involuntary commitments. Those who have been charged with a felony, adjudicated fit for trial, released on bond and treated in the DMH as voluntary patients while awaiting trial, have similarly been "temporarily" removed from the Department of Corrections' primary jurisdiction so that they are free to avail themselves of the services provided by the DMH. Persons acquitted of felonies by reason of insanity who are involuntarily committed to the DMH have been completely removed from the jurisdiction of the corrections system by virtue of their acquittals. And, finally, those who are convicted of a felony and subsequently transferred from the penitentiary to the DMH are only temporarily removed from the authority of the Department of Corrections. Ill. Rev. Stat. 1977, ch. 38, par. 1003-8-5(e).
 3 The question becomes whether the legislature had a rational basis for *590 determining that those persons who, like the defendants, were found fit to stand trial and in need of mental treatment, should remain under the jurisdiction of the Department of Corrections rather than being transferred to the DMH's jurisdiction while awaiting trial. We believe there is a rational basis for this disparate treatment.
Under the terms of the speedy trial act (Ill. Rev. Stat. 1977, ch. 38, par. 103-5), criminal defendants have the right to be brought to trial within 120 days of the time they are taken into custody. Confining such persons in a facility which is located close to the criminal courts will assist the State in implementation of this right. Testimony at the hearing below indicated that the only DMH facility providing maximum security is at Chester, Illinois, approximately 350 miles from Chicago. The State's duty to comply with the speedy trial act would be hindered if the defendants were housed at Chester while awaiting trial.
The defendants' right to a speedy trial and the short term nature of pretrial detention would also make mental health treatment planning difficult. Effective planning would be thwarted where mental health patients awaiting trial are engaged in planning for their defenses and making pretrial appearances in court. Additionally, treatment planning would be hindered by the fact that the DMH would be unable to predict with any accuracy when the defendant would actually come to trial. For these reasons, we conclude the legislature had a rational basis for determining that persons in need of mental treatment who are awaiting trial on criminal charges should remain under the jurisdiction of the Department of Corrections at least until those charges are disposed of.
The judgment of the circuit court of Cook County is reversed.
Reversed.
ROMITI and LINN, JJ., concur.
