
261 Wis.2d 694 (2003)
2003 WI App 60
659 N.W.2d 455
STATE of Wisconsin EX REL. Darrell W. GRIFFIN, Petitioner-Appellant,
v.
Jon E. LITSCHER, Respondent-Respondent.
No. 02-1704.
Court of Appeals of Wisconsin.
Submitted on briefs November 11, 2002.
Decided February 27, 2003.
*699 On behalf of the petitioner-appellant, the cause was submitted on the brief of Darrell W. Griffin, pro se.
On behalf of the respondent-respondent, the cause was submitted on the brief of Charles D. Hoornstra, assistant district attorney, and James E. Doyle, attorney general.
Before Vergeront, P.J., Dykman and Roggensack, JJ.
¶ 1. DYKMAN, J.
Darrell W. Griffin appeals from an order quashing his petition for a writ of mandamus. Griffin asserts that the trial court erred when it concluded that the provisions of OKLA. STAT. ANN. tit. 57, § 138 (West 2001) did not entitle him to credit against his Wisconsin prison sentence. He seeks reversal of the order quashing his petition and a recalculation of his sentence to include one thousand and eighty-six days of Oklahoma "earned and achievement credits." We conclude that Wisconsin and not Oklahoma law determines the length of Griffin's sentence. We therefore affirm.

BACKGROUND
¶ 2. Griffin was sentenced in Milwaukee County Circuit Court on November 12, 1992, to twenty-two years in prison for attempted homicide and armed robbery. On January 6, 1999, he was transferred to the North Fork Correctional Facility in Sayre, Oklahoma. North Fork is a private prison operated by the Corrections Corporation of America. The Department of Corrections *700 contracts with CCA to house Wisconsin prisoners in out-of-state institutions pursuant to WIS. STAT. § 301.21(2m) (2001-02).[1]
¶ 3. When Griffin first attempted to file a petition for a writ of mandamus seeking credits under the provisions of OKLA. STAT. ANN. tit. 57, § 138 for his time served at North Fork, the trial court denied Griffin a fee waiver for his petition because Griffin could not establish a clear legal right to relief as required by WIS. STAT. § 814.29(1)(c). The trial court concluded that WIS. STAT. § 301.21(1m)(b) and (2m)(b) applied only to the conditions of confinement, not to a sentence's duration, and therefore Griffin's petition failed to state a claim. Griffin then petitioned for a supervisory writ. We granted the writ and directed the trial court to grant the fee waiver and allow Griffin's action to proceed. Concluding that the trial court had applied the wrong legal standard, we stated that "[t]here is a significant distinction between whether a complaint states a claim for relief for fee waiver purposes, and whether the plaintiff is ultimately entitled to relief on the merits. It appears that the trial court applied the latter standard to deny the fee waiver." State ex rel. Darrell W. Griffin v. Circuit Court for Dane County, No. 02-0001-W (Ct. App. Feb. 20, 2002) at 2 (citation omitted).
¶ 4. The trial court issued an alternative writ of mandamus on March 19, 2002, and the department moved to quash. The trial court granted the department's motion in a decision and order issued on June 10, 2002, again concluding that Griffin had failed to establish a clear legal right to relief and therefore mandamus was not warranted. Griffin appeals.


*701 ANALYSIS
[1, 2]
¶ 5. Mandamus is an extraordinary writ which may be used to compel a public officer to perform a duty which he or she is legally bound to perform. Karow v. Milwaukee County Civil Serv. Comm., 82 Wis. 2d 565, 568 n.2, 263 N.W.2d 214 (1978). There are four prerequisites for issuance of a writ of mandamus: (1) a clear legal right; (2) a positive and plain duty; (3) substantial damages; and (4) no other adequate remedy at law. Pasko v. City of Milwaukee, 2002 WI 33, ¶ 24, 252 Wis. 2d 1, 643 N.W.2d 72 (citation omitted).
[3-5]
¶ 6. A motion to quash a writ of mandamus is treated the same as a motion to dismiss a complaint in a civil action. WIS. STAT. § 783.01. The facts pleaded and all reasonable inferences from the pleading must be taken as true. State ex rel. Dalton v. Mundy, 80 Wis. 2d 190, 195 n.5, 257 N.W.2d 877 (1977). The petition will be dismissed only when it is quite clear that under no conditions can the plaintiff recover. See State v. American TV & Appliance of Madison, Inc., 146 Wis. 2d 292, 300, 430 N.W.2d 709 (1988). Whether a complaint or petition states a claim for which relief may be granted is a question of law which we review de novo. Bartley v. Thompson, 198 Wis. 2d 323, 331, 542 N.W.2d 227 (Ct. App. 1995).
¶ 7. The issue of this appeal is whether Griffin is entitled to earned credits under Oklahoma law and therefore meets the first prong of mandamus, that is, a clear legal right to the relief he seeks. Griffin argues that because he is incarcerated in a correctional facility located in Oklahoma, he is subject to all the statutes pertaining to inmates in the State of Oklahoma prison *702 system. Griffin submits that, just as Oklahoma inmates are given earned credits against their sentences for every month of incarceration, he should receive the same credits for his confinement at North Fork, even though he is a Wisconsin prisoner. The basis for his claim is OKLA. STAT. ANN. tit. 57, § 138, which provides:
Earned creditsEligibility A. Except as otherwise provided by law, every inmate of a state correctional institution shall have their term of imprisonment reduced monthly, based upon the class level to which they are assigned. Earned credits may be subtracted from the total credits accumulated by an inmate, upon recommendation of the institution's disciplinary committee, following due process, and upon approval of the warden or superintendent. Each earned credit is equivalent to one (1) day of incarceration. Lost credits may be restored by the warden or superintendent upon approval of the classification committee. If a maximum and minimum term of imprisonment is imposed, the provisions of this subsection shall apply only to the maximum term. No deductions shall be credited to any inmate serving a sentence of life imprisonment; however, a complete record of the inmate's participation in work, school, vocational training, or other approved program shall be maintained by the Department for consideration by the paroling authority.
(Emphasis added.)
¶ 8. Griffin argues that the Oklahoma law applies to him, a Wisconsin prisoner, because of language in WIS. STAT. § 301.21(2m). The relevant provisions are as follows:
(2m)(a) The department may enter into one or more contracts with a private person for the transfer and confinement in another state of prisoners who have been committed to the custody of the department . . . .
*703 (b) While in an institution in another state covered by a contract under this subsection, Wisconsin prisoners are subject to all provisions of law and regulation concerning the confinement of persons in that institution under the laws of that state.
Seizing on the phrase "Wisconsin prisoners are subject to all provisions of law and regulation concerning the confinement of persons in that institution under the laws of that state," Griffin contends that § 301.21(2m) "serves as a bridge to the laws of the state where the Wisconsin inmates have been sent." Thus he concludes that the Wisconsin statute unambiguously permits him to accrue the earned credits available to Oklahoma inmates under OKLA. STAT. ANN. tit. 57, § 138. We disagree with this reading of § 301.21(2m).
[6-9]
¶ 9. The construction of a statute presents a question of law which we review de novo. State ex rel. Treat v. Puckett, 2002 WI App 58, ¶ 9, 252 Wis. 2d 404, 643 N.W.2d 515. The predominant goal of all statutory interpretation is to ascertain legislative intent. Caflisch v. Staum, 2000 WI App 113, ¶ 7, 235 Wis. 2d 210, 612 N.W.2d 385. We look first to the plain language of a statute to determine its meaning. Pasko, 2002 WI 33 at ¶ 26. If we can determine a statute's meaning based upon its plain language, our inquiry stops there. Id. If, however, the statute's language is ambiguous, we will consult its legislative history, scope, context and purpose in order to discern the legislature's intent. Evers v. Sullivan, 2000 WI App 144, ¶ 5, 237 Wis. 2d 759, 615 N.W.2d 680.
*704 [10]
¶ 10. The hallmark of ambiguity is a statute's ability to support more than one reasonable interpretation. Harnischfeger Corp. v. LIRC, 196 Wis. 2d 650, 662, 539 N.W.2d 98 (1995). While there is a certain logic to Griffin's argument that his incarceration in Oklahoma should entitle him to the same sentence credits granted to Oklahoma prisoners, further examination reveals that his conclusion is unreasonable and does not reflect legislative intent.
[11]
¶ 11. First, WIS. STAT. § 973.15(6) provides that, whether confined in a federal institution or an institution in another state, WIS. STAT. §§ 302.11 (mandatory release) and 304.06 (parole) apply to inmates serving a sentence to the Wisconsin state prisons for crimes committed before December 31, 1999. As he was sentenced in 1992, Griffin falls under § 973.15(6). A determination that Griffin was eligible for earned credits provided by Oklahoma law would directly contravene this directive of Wisconsin sentencing law, which provides that his release is calculated pursuant to §§ 302.11 and 304.06.
[12]
¶ 12. Second, Griffin's argument regarding the effect of his transfer by the department to North Fork ignores the clear language in WIS. STAT. § 302.18(5), which states:
Transfers of inmates . . . . (5) Any person who is legally transferred by the department to a penal institution shall be subject to the same statutes, regulations and discipline as if the person had been originally sentenced to that institution, but the transfer shall not change the term of sentence.
*705 [13]
¶ 13. In other words, no matter where a prisoner serves his sentence, if he has been sentenced to the Wisconsin prison system and is in the custody of the department, Wisconsin law still controls his sentence, even if the prisoner is transferred to another institution within Wisconsin or to one in another state. Griffin's assertion that he can accumulate Oklahoma earned credits implicitly concludes that, by contracting with CCA to house prisoners at North Fork, the department has relinquished jurisdiction over prisoners transferred there. The department's contract with CCA, however, only delegates day-to-day decisionmaking; the department retains custody and final decisionmaking authority over transferred prisoners. See Treat, 2002 WI App 58 at ¶ 15; Evers, 2000 WI App 144 at ¶ 14 (A "sentence to the Wisconsin state prisons" is a "commitment to the custody of the department.").
[14]
¶ 14. Moreover, as a result of WIS. STAT. § 973.01(4) and (6), also known as the Truth-in-Sentencing Law, good time credits and parole have been abolished in Wisconsin for convictions after January 1, 2000. Griffin's interpretation of WIS. STAT. § 301.21(2m)(b) would allow inmates housed out of state to earn credits but deny that same incentive to inmates remaining in Wisconsin correctional institutions. Thus the reading Griffin proposes would render § 973.01 a nullity, and create a loophole for those inmates fortunate enough to be transferred to Oklahoma or another state that provides similar credits. This is an absurd result, which we are to avoid when interpreting statutes. State v. Williams, 198 Wis. 2d 516, 532, 544 N.W.2d 406 (1996); State Bank of Drummond v. Nuesse, 13 Wis. 2d 74, 78, 108 N.W.2d 283 *706 (1961) ("The plain, obvious, and rational meaning of a statute is always to be preferred to any curious, narrow, or hidden sense.").
[15-17]
¶ 15. Further, adopting Griffin's interpretation of WIS. STAT. § 301.21(2m)(b) would require us to disregard the actual words used by the legislature in that statute. The legislature's reference to "provisions of law and regulation concerning the confinement of persons" in § 301.21(2m)(b) means just that: the conditions of confinement and procedures used in the out-of-state institution. Contrary to Griffin's assumption, earned credits do not "fall under [the] umbrella" of laws and regulations "concerning confinement," but are an element of Oklahoma's sentencing system, just as the good time credits abolished by WIS. STAT. § 973.01(4) were a part of Wisconsin's sentencing scheme. This distinction between "confinement" and "sentence" in Wisconsin law is reflected in the legislature's mandate in WIS. STAT. § 302.18(5) that "the transfer shall not change the term of sentence."[2] Had the legislature intended that Wisconsin prisoners transferred to out-of-state institutions be eligible for earned credits or good time, which would *707 decrease the duration of their sentence, it would not have restricted the Oklahoma laws applicable to transferred prisoners to those "concerning confinement."
[18]
¶ 16. In addition, we note that Oklahoma law rejects any assertion that the provisions of its sentencing laws apply to inmates sentenced to the Wisconsin prison system but incarcerated in Oklahoma pursuant to a contract between the department and CCA. In OKLA. STAT. ANN. tit. 57, § 563.2K, the Oklahoma legislature has preempted Griffin's argument that the reference to "every inmate of a state correctional institution" in tit. 57, § 138 should be read as pertaining to non-Oklahoma inmates:
K. The State of Oklahoma shall not assume jurisdiction or custody of any federal inmate or inmate from another state housed in a facility owned or operated by a private prison contractor. Such inmates from another state shall at all times be subject to the jurisdiction of that state and federal inmates shall at all times be subject to federal jurisdiction. This state shall not be liable for loss resulting from the acts of such inmates nor shall this state be liable for any injuries to the inmates.
In sum, Oklahoma expressly disclaims the authority over out-of-state prisoners that Griffin presupposes.
[19-21]
¶ 17. Finally, Griffin argues that not getting earned credits under OKLA. STAT. ANN. tit. 57, § 138 for the time he is incarcerated in Oklahoma violates his *708 constitutional right to equal protection. "Equal protection addresses differential treatment among groups or classes of people who are similarly situated." Hatch v. Sharp, 919 F.2d 1266, 1269 n.4 (7th Cir. 1990). When, as here, the classification is not based upon a suspect class and does not burden the exercise of a fundamental right, it need bear only "a rational relationship to a legitimate government interest" in order to survive an equal protection challenge. State v. Trepanier, 204 Wis. 2d 505, 509-10, 555 N.W.2d 394 (Ct. App. 1996).[3] That a rational basis exists for treating Wisconsin prisoners differently from those persons incarcerated in Oklahoma is obvious. It is entirely rational to distinguish between inmates who have been sentenced to a term of imprisonment by the State of Wisconsin and those who have been sentenced under Oklahoma law. That Griffin is currently housed in a facility located in Oklahoma does not change the fact that he was sentenced by a Wisconsin court and remains in the custody of the *709 Wisconsin Department of Corrections. His transfer to Oklahoma does not trigger a change in his Wisconsin sentence. Therefore we reject his assertion that being denied earned credits available under Oklahoma law to Oklahoma prisoners offends equal protection.
¶ 18. Accordingly, there is no support in the laws of either Wisconsin or Oklahoma for the conclusion that Griffin is entitled to earned credit for that portion of his sentence served at North Fork. The trial court did not err in finding that Griffin failed to state a clear legal right to relief entitling him to mandamus.
By the Court.Order affirmed.
NOTES
[1]  All references to the Wisconsin Statutes are to the 2001-02 version unless otherwise noted.
[2]  As explained in Prue v. State, 63 Wis. 2d 109, 116, 216 N.W.2d 43 (1974),

While it is true that the word "sentence" or "sentencing" may be and often is used in a more general sense ..., nevertheless, "sentence" is a legal term and should be given its legal meaning when used in the statutes and the law unless there are strong indications the term was used in a general sense.
Thus, "in the language of the criminal law, a sentence of imprisonment is a term of incarceration or supervision on parole which continues until the defendant is finally discharged." Grobarchik v. State, 102 Wis. 2d 461, 468, 307 N.W.2d 170 (1981). In contrast, "confinement" is the noun form of "to
[3]  Contrary to Griffin's assertion that we should consider his claim under the strict scrutiny standard of review, the appropriate test is whether rational basis exists for the different treatment of Oklahoma prisoners and Wisconsin prisoners housed in Oklahoma pursuant to the department's contract with CCA See, e.g., McGinnis v. Royster, 410 U.S. 263, 270-73 (1973) (using the rational basis test to conclude that denying good time credits for jail time but allowing credits for time spent in prison was not a denial of equal protection since the disciplinary and rehabilitative functions of the good time credit system were related to the prison's function and goals); State v. Aderhold, 91 Wis. 2d 306, 284 N.W.2d 108 (concluding under rational relationship test that denying good time credits for time spent on probation did not violate equal protection); and State ex rel. Khan v. Sullivan, 2000 WI App 109, ¶ 9, 235 Wis. 2d 260, 613 N.W.2d 203 (per curiam) (applying rational relationship test to prisoner legislation).
