
25 P.3d 163 (2001)
2001 MT 88
Victor SEBASTIAN, Petitioner,
v.
Mike MAHONEY, Warden, Montana State Prison, Respondent.
No. 01-167.
Supreme Court of Montana.
May 16, 2001.
Rehearing Denied June 21, 2001.

OPINION AND ORDER
¶ 1 Victor Sebastian, by and through counsel, has petitioned this Court for a writ of habeas corpus. Sebastian's petition raises one issue: whether the Department of Corrections erred by limiting good time for presentence incarceration to ten days per month pursuant to § 50-30-105, MCA (1993). We deny Sebastian's petition.

BACKGROUND
¶ 2 Sebastian was convicted of multiple counts of felony theft in Lake, Missoula, and Ravalli Counties between 1990 and 1993. He was convicted of burglary in Ravalli County in 1994. The above courts imposed various combinations of suspended sentences and prison commitments. Sebastian's suspended sentences were revoked at times and he was committed to the Montana State Prison. The Department ultimately awarded Sebastian a total of eighty-one days of jail good time credit.
¶ 3 On March 8, 2001, Sebastian filed a petition for writ of habeas corpus requesting that he be released from his unlawful restraint. Sebastian initially raised three issues: (1) he contended that the Department had failed to award him good time credit for time served in prerevocation confinement in violation of Reece v. Department of Corrections, 2001 MT 7, 304 Mont. 80, 18 P.3d 314; (2) he contended that the Department failed to appropriately apply its award of jail good time by failing to apply thirty-six days of its eighty-one day award to his discharge date; (3) and he maintained that the Department's jail good time policy violated MacPheat v. Mahoney, 2000 MT 62, 299 Mont. 46, 997 P.2d 753. The Department responded that it *164 had awarded Sebastian two additional days of good time for time served in county detention awaiting revocation of his Lake County suspended sentence and that thirty-six days of its initial eighty-one day award of jail good time did not affect the length of Sebastian's confinement because those days were awarded with regard to sentences which do not control Sebastian's discharge date. In reply, Sebastian acknowledged that the only remaining issue is whether the Department's policy of awarding good time for presentence incarceration at the rate of 10 days per month violates MacPheat.
¶ 4 On April 5, 2001, Sebastian was released from the Montana State Prison. He is currently serving a ten year suspended sentence. The Department subsequently filed a motion to dismiss alleging that Sebastian's petition was moot by virtue of his release from confinement. Sebastian has filed a response to the Department's motion to dismiss contending that his petition is not moot.

DISCUSSION
¶ 5 Did the Department of Corrections err by limiting jail good time to ten days per month pursuant to § 53-30-105, MCA (1993)?
¶ 6 As a preliminary matter, we must determine whether Sebastian's petition has become moot because of his release from Montana State Prison. Sebastian argued that he was entitled to a writ of habeas corpus because he was being unlawfully imprisoned due to the Department's unconstitutional jail good time policy. The Department alleges that the legality of Sebastian's imprisonment is moot because Sebastian has been released from imprisonment. Sebastian responds that his case is not moot because, although he has been released from prison, he is still suffering under an unlawful restraint on his libertythe discharge date of the ten year suspended sentence he is currently serving depends on the good time credit to which he is entitled.
¶ 7 "A question is moot when the court cannot grant effective relief." Shamrock Motors, Inc. v. Ford Motor Co., 1999 MT 21, ¶ 19, 293 Mont. 188, ¶ 19, 974 P.2d 1150, ¶ 19. A writ of habeas corpus may issue if the petitioner is unlawfully imprisoned or restrained. Section 46-22-101, MCA. We have denied petitions for writ of habeas corpus as moot when the petitioner has been released from custody or released on parole during the pendency of the action. See State v. Sor-Lokken, (1991), 247 Mont. 343, 351, 805 P.2d 1367, 1373 (denying petition as moot because petitioner released from custody); Quigg v. Crist (1978), 177 Mont. 134, 136, 580 P.2d 921, 923 (denying petition seeking release from disciplinary segregation as moot because petitioner released on parole). However, while release from custody may moot some habeas petitions because we can no longer grant the relief requested by the petitioner, release from custody does not necessarily moot a petition for a writ of habeas corpus. Rather, a habeas petition becomes moot when the petitioner's release from custody prevents the court from granting "effective relief." Cf. Shamrock, ¶ 19. In this regard, we note that "it is not premature to consider a habeas petition prior to the time the inmate is entitled to [relief]" and that "immediate physical release is not the only remedy available under a writ of habeas corpus." Eisenman v. State, 2000 MT 170, ¶ 14, 5 P.3d 542, ¶ 14, 57 St. Rep. 704, ¶ 14 (citing Peyton v. Rowe (1968), 391 U.S. 54, 67, 88 S.Ct. 1549, 1556, 20 L.Ed.2d 426).
¶ 8 Whether Sebastian's habeas petition is moot depends on whether his release from custody prevents us from granting effective relief. Although Sebastian has been released from custody, the issue of the amount of jail good time credit to which he is entitled has not been mooted. Sebastian continues to serve a ten year suspended sentence. The completion date of Sebastian's suspended sentence depends on the discharge date of his term of confinement and thus is based on the jail good time credits to which he is entitled. Assuming arguendo that the Department's jail good time policy is unlawful and its application to Sebastian's prison term led to an erroneous discharge date, Sebastian's completion date on his suspended sentence will likewise be incorrect. It is beyond cavil that a person restrained by the terms of a suspended sentence beyond its lawful completion date is being unlawfully restrained of *165 his or her liberty. Accordingly, we hold that Sebastian's petition is not moot. We thus turn to the merits of Sebastian's petition.
¶ 9 Sebastian argues that the Department's policy of awarding ten days of good time per month for presentence incarceration served prior to the amendment of § 53-30-105, MCA (1993), constitutes a wealth-based classification in violation of our holding in MacPheat. In MacPheat, we stated:
[W]e hold that if the criminal defendant, for no other reason than his [indigence], is unable to secure his pre-sentence freedom by posting bail, then he is entitled to good-time credit for the time he spends in the county detention facility, pre-sentence, to the same extent that the law allows good-time credit to the criminal defendant who is able to post bail and, thus, serve the entirety of his sentence in the state correctional facility.
MacPheat, ¶ 22.
¶ 10 Section 53-30-105(1), MCA (1993), provided in relevant part:
The rules adopted by the department ... may not grant good time allowance to exceed:
(a) 10 days per month for inmates assigned to maximum, close, and medium I security classifications;
(b) 13 days per month for those classified as medium II and minimum security classifications;
(c) 15 days per month for inmates after having been assigned as medium II or minimum security for an uninterrupted period of 1 year;
(d) 13 days per month for those inmates enrolled in school who successfully complete the course of study ...;
(e) 3 days per month for those inmates participating in self-improvement activities designated by the department.[1]
¶ 11 Regarding Sebastian's argument that pretrial detainees are entitled to more than ten days per month of good time credits for time spent incarcerated prior to 1995, we note that we have previously addressed this issue. In Corcoran v. Mahoney, No. 00-346, 12 P.3d 428 (decided July 13, 2000), we stated in an unpublished order that security levels found in county jails are consistent with close custody security classifications at the Montana State Prison. Therefore, defendants who are incarcerated presentence are entitled to ten days per month of good time credit under the former good time statute. Sebastian, however, argues that the amount of good time must not be determined on the security level of the housing, but rather on the classification assigned to the prisoner, pointing out that at times prisoners are housed in more secure areas than justified by their classification.
¶ 12 The problem with Sebastian's argument is that it assumes a classification for presentence jail time before a classification has been assigned. Some prisoners may be classified to maximum security based on the nature of the offense and their previous criminal history. It is pure speculation to assume that a prisoner will be either assigned to maximum security or minimum security before the classification occurs. It is virtually impossible to apply § 53-30-105, MCA (1993), to pretrial detainees because the statute was not designed to apply to prisoners housed in county jails. Any attempt to apply the statute to this group of prisoners will result in arguable inequities. For instance, under the application urged by Sebastian, not only do we have to assume that the indigent defendant was entitled to the same security classification upon entering county detention that he or she received upon entering the prison, but we also have to assume that the defendant maintained that hypothetical security classification while in county detention, that the indigent defendant attended and completed non-existent school programs, that the indigent defendant participated in non-existent self-improvement programs, and that the indigent defendant behaved well while so detained. Applying the pre-1995 *166 good time statute in this manner stretches MacPheat to the breaking point.
¶ 13 We conclude that the Department has adopted a reasonable policy in determining that pretrial detainees are entitled to no more than ten days of good time per month based on the pre-1995 statute. Therefore, the Department correctly determined that the Sebastian's projected discharge date was April 5, 2001.
¶ 14 IT IS HEREBY ORDERED that the petition for habeas corpus is DENIED.
/s/ KARLA M. GRAY
Chief Justice
JIM REGNIER
JAMES C. NELSON
PATRICIA COTTER
JIM REGNIER
Justices
Justice TERRY N. TRIEWEILER, dissenting.
¶ 15 I concur with the majority's conclusion that Sebastian's petition is not moot. I dissent from the majority's conclusion that Sebastian's petition is without merit.
¶ 16 The majority opinion correctly states the controlling rule from MacPheat v. Mahoney, 2000 MT 62, 299 Mont. 46, 997 P.2d 753, but then fails to apply the rule. In MacPheat we held that if a criminal defendant is unable to secure his presentence freedom for no other reason than his indigency, then he is entitled to good time credit for the time spent in county jail to the same extent that he would have received good time credit had he served the entirety of his sentence in a state correctional facility.
¶ 17 In this case it is undisputed that Sebastian spent 321 days in county jails awaiting sentencing and twenty days in county jails awaiting probation revocation. His indigence is not an issue nor is it denied that all of the offenses for which he was imprisoned were bailable.
¶ 18 However, the majority cites our previous order in Corcoran v. Mahoney, No. 00-346, 12 P.3d 428 (decided 7/13/00), for the conclusion that security levels found in county jails are consistent with close custody security classifications at Montana State Prison and that, therefore, defendants incarcerated in county jails are entitled to no more than ten days per month good time pursuant to the pre 1995 good time statute which applies to Sebastian. The majority concludes that "it is pure speculation" what a defendant's classification will be when he arrives at the Montana State Prison and therefore it is "impossible" to apply § 53-30-105, MCA (1993), to pretrial detainees.
¶ 19 I disagree. First, Corcoran was a pro se petition which did not address the constitutional issue raised by Sebastian and is in no way binding on anyone other than the Department of Corrections and Corcoran. Second, we know exactly how long Sebastian spent in the reception unit each time he was sent to the state prison following his detention at a county jail and we know exactly what his classification was after he was transferred from the reception unit. Therefore, it is possible to comply with the mandate of MacPheat and determine exactly how much good time Sebastian would have been entitled to receive had he been able to post bail and serve the entirety of his sentence in the state correctional facility.
¶ 20 For example, Sebastian was first sent to the Montana State Prison following detention at a county jail on August 29, 1990. He was housed in the reception unit for seventeen days until September 14, 1990, and then received an institutional classification of "Minimum II." He was entitled to good time at the rate of ten days per month for the seventeen days spent in the reception unit and a minimum of fifteen days per month for the time spent thereafter while classified Minimum II. However, because he spent eighty-three days in the county jail awaiting imposition of that sentence, he was denied at least five days per month good time credit for that eighty-three days based on his indigency.
¶ 21 Sebastian arrived at the prison a second time on January 11, 1991, and spent eleven days in the reception unit following which he was classified "Minimum I." The third time he was sent to the Montana State Prison he spent three days in the reception unit and was classified "Minimum II." The last time he was sent to the Montana State *167 Prison he spent twenty days in the reception unit and was again classified "Minimum II."
¶ 22 In other words, we know exactly how many days it took to classify Sebastian each time he was sent to the prison and we know that each time he was classified, it was to a classification for which he was entitled to more than ten days per month of good time credit. Allowing ten days of good time credit for the total amount of time spent by Sebastian in the reception unit and giving him credit at the rate he was actually given by the prison following his various classifications, it is quite simple to determine how much good time credit Sebastian was denied while imprisoned at county jails because of his indigency. Therefore, there is no sound reason under the Equal Protection Clause as enforced in MacPheat to deny him equal treatment.
¶ 23 The problem with the reasoning in the majority opinion is that it assumes good time should be calculated based on conditions in the county jail. On the contrary, the principle established in MacPheat is that the defendant is entitled to the same good time as if his entire sentence had been served in the state prison. Therefore, the fact that no classification had been assigned while in county jail and the fact that § 53-30-105, MCA (1993), was not intended to apply to county jails is irrelevant.
¶ 24 Contrary to the reasoning in ¶ 12 of the majority opinion, awarding Sebastian the appropriate amount of good time credit does not require the assumption that he was entitled to any security classification upon entering the county jail. We know that there are none. Instead, we are required to assume that he was able to post bail and would not have served any pre-sentence time in county jail. Nor do we need to assume that he maintained his original classification in county jail or that he participated in non-existent programs. The fact that they have no programs in county jails is exactly the point. Those who can afford bail serve their entire sentence with access to programs which can reduce the term of their imprisonment. Those who cannot afford bail serve longer because no programs are available.
¶ 25 Instead of speculating about non-existent programs, we need only to look at his actual record at the state prison to determine exactly what his post-sentence record was and then apply it to his pre-sentence jail time.
¶ 26 For example, assume that Sebastian or any other inmate served 200 days in a county jail prior to conviction and imposition of sentence because he could not afford bail. Assume that he then was sentenced to prison where he spent thirty days in the reception unit, was classified for minimum security and discharged the prison portion of his sentence after 300 additional days. We know that had he been able to post bail he would have credit for 530 days at the prison rather than 330, and that for all but the first thirty of those days he would have been entitled to at least thirteen days of credit per month rather than ten. On that basis, the calculation of the actual good time credit to which he was entitled leaves no room for speculation.
¶ 27 We do not speculate about what he could have earned in county jail because we assume he would not have been in county jail. We look to his actual record in prison to see what he would have earned in prison had his entire sentence been served there.
¶ 28 Because of the majority's decision in this case, indigent criminals in Sebastian's situation are imprisoned longer than those who can afford bail even though they have committed the same crime and their circumstances are otherwise identical. This is a classification which denies liberty based on financial status. Without a compelling basis for the distinction (and the Department of Corrections has demonstrated none), it violates the Equal Protection Clause of the Montana State Constitution.
¶ 29 For these reasons I concur in part and dissent in part from the majority opinion.
Justice W. WILLIAM LEAPHART joins in the foregoing dissent.
NOTES
[1]  The good time statue was subsequently amended to provide for one day of good time for each day served. See § 53-30-105(1), MCA (1995).
