The petitioner appeals from the denial of his petition for a writ of habeas corpus. The sole issue in this appeal is whether the court erred in concluding that the state had not violated the equal protection clauses of both the state and federal constitutions by declining to credit against the length of an insanity acquittee’s commitment to a mental hospital the time spent in confinement prior to trial. We find error.
The facts of this case are not in dispute. On March 5, 1976, the petitioner was arrested and charged with *76manslaughter in the first degree in violation of General Statutes § 53a-55. Bail for the petitioner was initially set at $100,000, but was later reduced to $50,000. The petitioner, however, was unable to post bond because of his indigency. The petitioner thereupon spent some 293 days in jail awaiting trial. In addition, the petitioner spent 378 days in a mental hospital prior to trial while his competency to stand trial was determined.
On January 5, 1978, a criminal court adjudged the petitioner not guilty by reason of insanity. Pursuant to General Statutes (Rev. to 1977) § 53a-47 (repealed and replaced by General Statutes § 17-257), the petitioner was sent to Norwich Hospital for psychiatric examination. On April 27,1978, after the petitioner had been examined, the court ordered him committed to confinement in a mental institution for a maximum term of ten years. Thereafter, the state declined to credit the petitioner’s pretrial confinement time against the maximum term of his commitment.
On March 24,1987, the petitioner filed a petition for a writ of habeas corpus alleging that the refusal to grant him credit for his pretrial confinement was violative of the equal protection guarantees of the federal and state constitutions.1 The habeas court rejected this argument and found for the state on all claims.
The petitioner has since appealed to this court from the decision of the habeas court. While the petitioner’s appeal was pending before this court, however, the maximum term of his commitment expired. The state has since taken steps to have the length of the petitioner’s commitment extended.
*77Since the petitioner’s maximum term of commitment has expired, we must first determine whether we have authority to hear the petitioner’s claim that his pretrial jail time should have been credited against that term of commitment. “ ‘ “It is a well-settled general rule that the existence of an actual controversy is an essential requisite to appellate jurisdiction; it is not the province of appellate courts to decide moot questions, disconnected from the granting of actual relief or from the determination of which no practical relief can follow.” Reynolds v. Vroom, 130 Conn. 512, 515, 36 A.2d 22 (1944); McCallum v. Inland Wetlands Commission, 196 Conn. 218, 225, 492 A.2d 508 (1985); Accurate Forging Corporation v. UAW Local No. 1017, 189 Conn. 24, 26, 453 A.2d 769 (1983); State Farm Life & Accident Assurance Co. v. Jackson, 188 Conn. 152, 156, 448 A.2d 832 (1982); CEUI v. CSEA, 183 Conn. 235, 246, 439 A.2d 321 (1981). “In the absence of an actual and existing controversy for us to adjudicate in any sense of the term, the courts of this state may not be used as a vehicle to obtain judicial opinions upon points of law; Reply of the Judges, 33 Conn. 586 [1867]; and where the question presented is purely academic, we must refuse to entertain the appeal. Young v. Tynan, 148 Conn. 456, 459, 172 A.2d 190 [1961].” Connecticut Foundry Co. v. International Ladies Garment Workers Union, 177 Conn. 17, 19, 411 A.2d 1 (1979),’ Shays v. Local Grievance Committee, 197 Conn. 566, 571-72, 499 A.2d 1158 (1985).” Murray v. Lopes, 205 Conn. 27, 30-31, 529 A.2d 1302 (1987).
In Delevieleuse v. Manson, 184 Conn. 434, 437, 439 A.2d 1055 (1981), our Supreme Court reached the merits of a claim that an inmate was entitled to jail time credit even though the person had been released. In determining that the matter was not moot, the court noted that the issue raised was capable of repetition, yet evading review. A matter which is capable of repe*78tition, yet evading review is reviewable on appeal if (1) the matter affects an ongoing program of the state’s penal or civil system, (2) the matter could affect the petitioner in the future, and (3) the public importance of the matter makes it desirable to decide the issue. Shays v. Local Grievance Committee, 197 Conn. 566, 572-73, 499 A.2d 1158 (1985); Delevieleuse v. Manson, supra, 437.
We find that the petitioner’s claim is entitled to review under this standard. Because of the length of time required to file a petition for habeas corpus and then to seek relief via the appellate process, it is unlikely that an appellate court will be able to decide the issue presented in this case in time to afford the insanity acquittee practical relief. Second, the matter affects an ongoing program of the state’s civil system. Third, the matter could affect the petitioner in the future if he is released and again commits a crime. Fourth, we find that this is a matter of great public importance and, therefore, should be reviewed at this time.
We begin our analysis of the substance of the petitioner’s claim by noting that the equal protection clause of the fourteenth amendment to the United States constitution provides that no state shall “deny to any person within its jurisdiction the equal protection of the law.” Similar protection is afforded persons in this state by article first, § 20, of the Connecticut constitution. Frazier v. Manson, 176 Conn. 638, 645, 410 A.2d 475 (1979). As this court has recognized, “[ejqual protection of the laws is a constitutional shield . . . which prohibits unequal treatment by the law of those who are similarly situated. Henry v. White, 359 F. Sup. 969, 971 (D. Conn. 1973); New Haven Metal & Heating Supply Co. v. Danaher, 128 Conn. 213, 218-19, 21 A.2d 383 (1941).” State v. Candito, 4 Conn. App. 154, 159, 493 A.2d 250 (1985). “[T]he equal protection clause does not reject the government’s ability to classify or ‘draw *79lines’ in the creation and application of laws. Rather, it guarantees that those classifications will not be based on impermissible criteria.” Al-Charles, Inc. v. Heintz, 620 F. Sup. 327, 335 (D. Conn. 1985).
To determine whether a particular classification violates the guarantees of equal protection, we must consider the character of the classification, the individual interest affected by the classifications, and the governmental interests asserted in support of the classification. Dunn v. Blumstein, 405 U.S. 330, 335, 92 S. Ct. 995, 31 L. Ed. 2d 274 (1971). Where the classification impinges upon a fundamental right or impacts upon an “inherently suspect” group, it will be subjected to strict scrutiny and will be set aside unless it is justified by a compelling state interest. Laden v. Warden, 169 Conn. 540, 542, 363 A.2d 1063 (1975). Furthermore, classifications impinging upon fundamental rights or suspect groups must be narrowly tailored to further the compelling state interest. “ ‘[I]f there are other, reasonable ways to achieve [the state’s interests] with a lesser burden or constitutionally protected activity, a State may not choose the way of greater interference. If it acts at all, it must choose “less drastic means.” Shelton v. Tucker, 364 U.S. 479, 488 . . . [81 S. Ct. 247, 5 L. Ed. 2d 231].’ Dunn v. Blumstein, [supra 343].” Laden v. Warden, supra, 549. On the other hand, where the classification at issue neither impinges upon a fundamental right nor affects a suspect group it will withstand constitutional attack if the distinction is founded on a rational basis. Laden v. Warden, 542-43; see also McGinnis v. Royster, 410 U.S. 263, 270, 93 S. Ct. 1055, 35 L. Ed. 2d 282 (1972); Dandridge v. Williams, 397 U.S. 471, 484, 485, 90 S. Ct. 1153, 25 L. Ed. 2d 491 (1969).
The classification created by the state in this case does impact upon a fundamental right of those insanity acquittees who are confined prior to trial. As our *80Supreme Court noted in Laden v. Warden, supra, 544, “[t]he refusal to credit the plaintiff with jail time affects the period of his confinement and directly impinges on his fundamental right of liberty. In re Winship, 397 U.S. 358, 364, 90 S. Ct. 1068, 25 L. Ed. 2d 368 [1970]; Brenneman v. Madigan, 343 F. Sup. 128, 138 (N.D. Cal. [1972]).”2 Similarly, the refusal to credit the petitioner with any other time he spent in confinement prior to trial also affects the petitioner’s period of confinement. Accordingly, the practice of subjecting one who is confined prior to trial to a longer period of confinement must be disavowed unless it is justified by a compelling state interest. Id.
The state claims that it was justified in refusing to credit the petitioner’s pretrial confinement time against the maximum term of his insanity commitment because *81of the compelling interest the state has in the protection of society. We disagree.
At the outset, we acknowledge that the state does have a compelling interest in the protection of society. In particular, the state has a compelling interest in protecting society from those persons who have committed a crime and have been adjudged to be mentally ill and a danger to society. Jones v. United States, 463 U.S. 354, 364, 103 S. Ct. 3043, 77 L. Ed. 2d 694 (1982); see also Addington v. Texas, 441 U.S. 418, 426, 99 S. Ct. 1804, 60 L. Ed. 2d 323 (1979). The question in this case is whether the method chosen to further that interest is rationally related to the end sought and, if so, whether the state’s interest could be adequately addressed by less intrusive means. Laden v. Warden, supra, 547, 549.
Connecticut has chosen to protect society from those who have committed a crime and have been adjudged to be mentally ill and a danger to society by having those persons committed to a mental institution. General Statutes § 17-257c (e) (1). Commitment, itself, has been held to be a legitimate means of furthering the state’s interest in the protection of society. Addington v. Texas, supra, 426. Commitment protects society by isolating the insanity acquittee and providing him with treatment. Jones v. United States, supra. To this end, the United States Supreme Court has held that a state may commit an insanity acquittee until such time as he regains his mental health or ceases to be a danger to society. Id., 370.
In this case, the petitioner was committed to a mental institution pursuant to General Statutes § 17-257c (e) (l)3 for a period of only ten years. The *82state had a compelling interest in seeing that the petitioner was not released prior to the expiration of that term of commitment if he had not regained his mental health. The act of denying the petitioner credit for his pretrial confinement time ensures that the petitioner will not be released early if he has not regained his mental health.4 Accordingly, we find that the act of denying the petitioner credit for his pretrial confinement time does rationally further the state’s interest in the protection of society.
We find, however, that the state’s interest in the protection of society is adequately secured by the provisions of General Statutes § 17-257n (c).5 This statute protects the state’s interests by allowing the state to petition for the continued confinement of insanity *83acquittees whose automatic release is imminent but whose release would pose a threat to society. General Statutes § 17-257n (c). If, after the state submits such a petition, a court determines that the acquittee still represents a danger to society, the acquittee will not be released. General Statutes § 17-257e (3).
At the same time, this statute is less intrusive upon the indigent’s fundamental right of liberty than is denying a petitioner credit for his pretrial confinement time. The application of this statute, in lieu of denying an insanity acquittee credit for the time spent on pretrial confinement, ensures that the acquittee who is subject to pretrial confinement will not be subject to a longer period of confinement than are those who are not confined prior to trial unless the state takes affirmative steps to seek such additional confinement, and a court determines that such confinement is necessary.6
Because General Statutes § 17-257n (c) adequately secures the state’s interest in the protection of society and is, at the same time, less intrusive upon the indigent’s fundamental right of liberty, we find that denying an indigent insanity acquittee credit for his pretrial confinement time is a violation of the acquittee’s fundamental right to equal protection of the laws.
*84There is error, the judgment is set aside and the case is remanded with direction to credit the petitioner with the time spent in confinement prior to trial.
In this opinion, the other judges concurred.
In his petition for habeas corpus, the petitioner also asserted that he was statutorily entitled to have the time he spent in confinement prior to trial credited against the maximum term of his commitment. The petitioner, however, has not raised the statutory claim on appeal. Accordingly, we will not consider it. We will, however, consider the petitioner’s claim that he was constitutionally entitled to such time.
In reaching this holding, we specifically reject the application of footnote twelve in Johnson v. Mamson, 196 Conn. 309, 493 A.2d 846, cert. denied, 1174 U.S. 1063, 106 S. Ct. 813, 88 L. Ed. 2d 787 (1985), to the facts of this case. In footnote twelve of Johnson, our Supreme Court applied a rational basis test in reviewing a claim that a nonindigent petitioner be credited with the time spent in confinement in Florida awaiting extradition to this state. Id., 321 n.12.
In deciding that the language of footnote twelve does not apply here, we first note that the Johnson court was dealing with a different issue from the one with which we are presented today. The court in Johnson was addressing the issue of whether a nonindigent petitioner who was detained prior to trial in another state was entitled to credit for that time; the court did not examine the issue of whether an indigent who spent time in jail in this state solely because of his indigency should be credited with that time. The factual situation in this case is more closely akin to that presented in Laden v. Warden, 169 Conn. 540, 542, 363 A.2d 1063 (1975), where a convicted petitioner sought credit for pretrial jail time spent in this state. We further note that the holding in Johnson is dicta which is not binding on this court and that the Johnson court in no way disavowed the analysis it had advanced in Laden v. Warden, supra. Accordingly, we follow the analysis used in Laden and hold that the state’s refusal to credit the petitioner with his pretrial jail time is violative of the petitioner’s equal protection rights unless the state can demonstrate a compelling interest for refusing to credit the time.
General Statutes § 17-257c (e) provides: “At the hearing, the court shall make a finding as to the mental condition of the acquittee and, consider*82ing that its primary concern is the protection of society, make one of the following orders:
“(1) If the court finds that the acquittee is a person who should be confined, the court shall order the acquittee committed to the jurisdiction of the board and confined in a hospital for mental illness for custody, care and treatment pending a hearing before the board pursuant to section 17-257d; provided (A) the court shall fix a maximum term of commitment, not to exceed the maximum sentence that could have been imposed if the acquittee had been convicted of the offense, and (B) if there is reason to believe that the acquittee is a person who should be conditionally released, the court shall include in the order a recommendation to the board that the acquittee be considered for conditional release pursuant to subdivision (2) of section 17-257e . . .
If the petitioner regains his mental health prior to the expiration of his maximum term of commitment, he may apply for a discharge pursuant to General Statutes § 17-257n (a). Furthermore, the superintendent of the hospital to which the acquittee is committed may petition to have the acquit-tee discharged prior to the expiration of his maximum term of commitment and the psychiatric review board may consider the acquittee’s discharge upon its own motion. General Statutes § 17-257m.
General Statutes § 17-257n (c) provides: “If reasonable cause exists to believe that the acquittee remains mentally ill to the extent that his discharge at the expiration of his maximum term of commitment would constitute a danger to himself or others, the state’s attorney, at least ninety days prior to such expiration, may petition the court for an order of continued commitment of the acquittee.”
We note that the additional burden placed on the state by the application of this statute is minimal. This statute merely calls for the state to make a petition to the court for further commitment. After the state makes such a petition, the state’s burden of proof is no greater or lesser than it would have been had the petitioner applied for discharge. General Statutes § 17-257e. Acccordingly, this situation is quite unlike that discussed in Jones v. United States, 463 U.S. 354, 366, 103 S. Ct. 3043, 77 L. Ed. 2d 694 (1982), where the United States Supreme Court noted that the state has a strong interest in avoiding a de novo commitment hearing after insanity acquittal—a hearing at which a jury trial may be demanded, and at which the government bears the burden of proof by clear and convincing evidence.