
75 P.3d 206 (2003)
139 Idaho 152
STATE of Idaho, Plaintiff-Appellant,
v.
Shawn SHANKS, Defendant-Respondent.
No. 28490.
Court of Appeals of Idaho.
July 16, 2003.
*207 Hon. Lawrence G. Wasden, Attorney General; Kenneth K. Jorgensen, Deputy Attorney General, Boise, for appellant. Kenneth K. Jorgensen argued.
Molly J. Huskey, State Appellate Public Defender; Eric Don Fredericksen, Deputy Appellate Public Defender, Boise, for respondent. Eric Don Fredericksen argued.
LANSING, Chief Judge.
This is an appeal from the dismissal of a charge for escape. The State argues that the district court erred by holding that Idaho's escape statute did not apply to the defendant, who had been arrested on a felony warrant but had not yet entered a jail or prison. We affirm.

BACKGROUND
In the early morning hours of January 13, 2002, two Bonner County Sheriff's deputies arrested Shawn Shanks at his girlfriend's residence on a misdemeanor warrant and a felony warrant. The deputies informed Shanks that he was under arrest, handcuffed him, and placed him in the backseat of a patrol vehicle, but they neglected to lock the vehicle's window lock. The deputies thereafter went into the residence, momentarily losing sight of Shanks and the vehicle. Two or three minutes later, one of the deputies returned to the vehicle and found that the rear window on the driver's side was down and that Shanks was gone. The deputies' immediate search for Shanks was unsuccessful, but several hours later they found him at his girlfriend's residence. Shanks was charged with felony escape, Idaho Code § 18-2505.
Shanks filed a motion in the district court to dismiss the charge, arguing that I.C. § 18-2505 is inapplicable to him because, at the time he exited the patrol vehicle, he was not a "prisoner" as the term is used in I.C. § 18-2505, and he had not been confined in any correctional facility, as required for violation of that statute. The district court granted the dismissal motion, concluding that the statute applies only to persons who have been convicted of a felony. The district court reasoned that the phrase in the first *208 paragraph of § 18-2505"Any such second term of imprisonment shall commence at the time he would otherwise have been discharged"contemplates that the individual was serving a sentence, and therefore had been convicted, when the escape occurred. The State now appeals.

ANALYSIS
Idaho Code § 18-2505(1) defines the offense of escape as follows:
Every prisoner charged with, convicted of, or on probation for a felony who is confined in any correctional facility, as defined in section 18-101A, Idaho Code, including any private correctional facility, or who while outside the walls of such correctional facility in the proper custody of any officer or person, or while in any factory, farm or other place without the walls of such correctional facility, who escapes or attempts to escape from such officer or person, or from such correctional facility, or from such factory, farm or other place without the walls of such correctional facility, shall be guilty of a felony, and upon conviction thereof, any such second term of imprisonment shall commence at the time he would otherwise have been discharged. Escape shall be deemed to include abandonment of a job site or work assignment without the permission of an employment supervisor or officer.
The State argues that the district court erred in holding that this statute applies only to those who have been convicted because the statute expressly covers a "prisoner charged with" a felony. The State also maintains that Shanks's unauthorized departure from the patrol vehicle qualifies as an escape under the statute because the statute encompasses persons who escape "while outside the walls of such correctional facility in the proper custody of any officer or person." According to the State, this would include persons like Shanks who have been arrested on a felony warrant but have not yet been brought into jail.
The interpretation of a statute is a question of law over which appellate courts in Idaho exercise free review. State v. Maidwell, 137 Idaho 424, 426, 50 P.3d 439, 441 (2002); State v. Beard, 135 Idaho 641, 646, 22 P.3d 116, 121 (Ct.App.2001). Interpretation of a statute begins with an examination of the statute's literal words. State v. Burnight, 132 Idaho 654, 659, 978 P.2d 214, 219 (1999). Where the language of a statute is plain and unambiguous, courts give effect to the statute as written, without engaging in statutory construction. State v. Rhode, 133 Idaho 459, 462, 988 P.2d 685, 688 (1999); State v. Escobar, 134 Idaho 387, 389, 3 P.3d 65, 67 (Ct.App.2000). If a court must engage in statutory construction, then its duty is to ascertain and give effect to the intent of the legislature. Beard, 135 Idaho at 646, 22 P.3d at 121. In so doing, we look to the context of the statutory language in question and the public policy behind the statute. State v. Cudd, 137 Idaho 625, 627, 51 P.3d 439, 441 (Ct.App.2002). When an ambiguous statute is part of a larger statutory scheme, we not only focus upon the language of the ambiguous statute, but also look at other statutes relating to the same subject matter and consider them together in order to discern legislative intent. State v. Paciorek, 137 Idaho 629, 632, 51 P.3d 443, 446 (Ct.App.2002).
The district court's reasoningthat Shanks could not be guilty of escape because he had not been convicted of the crime for which he had been arrestedwas erroneous because I.C. § 18-2505 expressly applies to persons "charged with" a felony.[1] However, where the judgment of the lower court is correct in result but based on an incorrect *209 theory, it will be affirmed on the correct theory. Southern Idaho Realty of Twin Falls, Inc.Century 21 v. Larry J. Hellhake and Assoc., Inc., 102 Idaho 613, 614, 636 P.2d 168, 169 (1981); Hagy v. State, 137 Idaho 618, 623, 51 P.3d 432, 437 (Ct.App.2002). Therefore, we must examine whether, on a proper interpretation of the statute, the dismissal order should be affirmed.
Section 18-2505(1) has four elements. Commission of the offense requires that the defendant: (1) was a "prisoner;" (2) charged with, convicted of, or on probation for, a felony; (3) confined in a correctional facility, outside the walls of such correctional facility in the proper custody of any officer or person, or in a factory, farm, or other place without the walls of such correctional facility; and (4) escaped or attempted to escape from such officer or person, from such correctional facility, or such factory, farm, or other place. I.C. § 18-2505. At issue in this case is whether Shanks was a "prisoner" as contemplated by the first element, and whether he was "outside the walls of such correctional facility" as contemplated by the third element.
The State relies upon the definition of "prisoner" provided in I.C. § 18-101A, the general definitions portion of the Idaho criminal code. That definition includes one who is in custody awaiting trial but who is not in a correctional facility because the person "is being transported in any manner" within the state of Idaho.[2] We agree that this definition is consistent with the use of the word "prisoner" in the context of § 18-2505(1). Shanks, who had been arrested on a felony warrant, fell within this definition of "prisoner." Therefore, the first element of § 18-2505(1) was satisfied in this case.
There remains the question whether the third element is satisfied, that is, whether Shanks was "outside the walls of such correctional facility." The question concerning this element is whether § 18-2505(1) refers to all persons in custody outside the confines of a correctional facility or only those who have been, at some point, incarcerated within a correctional facility.
Deriving the legislative intent with respect to this element requires that we examine the overall structure of the statute. The third element of § 18-2505(1) encompasses prisoners who are: (a) confined in a correctional facility, or (b) in custody "outside the walls of such correctional facility," or (c) in a factory, farm or other place without the walls of such correctional facility. If this element is satisfied whenever anyone convicted of or charged with a felony is outside the walls of a correctional facility and in the custody of an officer or person, then the statute's disjunctive list of three separate location categories from which an escape may occur would be rendered superfluous. This is so because the alternative circumstances of being in any correctional facility and being in custody outside the walls of a correctional facility exhaust all logical possibilities with regard to a correctional facility: one must either be inside or outside a correctional facility. If the legislature intended this breadth of coverage, it could have simply made the statute applicable to all prisoners charged with, convicted of, or on probation for a felony who are in the custody of an officer or other person. To give the statute such a broad application in the face of the legislature's careful articulation of three alternative types of locations from which an escape may occur could violate a fundamental tenet of statutory interpretation that courts should strive "to give effect to [every] word, clause and sentence of a statute" so as not to render parts superfluous or without meaning. University of Utah Hospital and Medical Center v. Bethke, 101 Idaho 245, 248, 611 P.2d 1030, 1033 (1980). *210 See also State v. Griffith, 127 Idaho 8, 11, 896 P.2d 334, 337 (1995).
We find significant the legislature's use of the word, "such," in the phrase "outside the walls of such correctional facility." The adjective, "such," means: "Of that kind; of the same or like kind; identical with or similar to something specified or implied; .... being the same as what has been mentioned or indicated...." In re Hull, 18 Idaho 475, 480, 110 P. 256, 257 (1910). In § 18-2505(1), the phrase, "outside the walls of such correctional facility" follows, "confined in any correctional facility." This linguistic structure implies that an individual must at some point have been confined in a correctional facility before he may be considered to be outside the walls of "such" correctional facility.
This interpretation of I.C. § 18-2505(1) is consistent with the doctrine of lenity, which requires that courts construe ambiguous criminal statutes in favor of the accused. State v. Wees, 138 Idaho 119, 124, 58 P.3d 103, 108 (Ct.App.2002); State v. Dewey, 131 Idaho 846, 848, 965 P.2d 206, 208 (Ct.App. 1998). It is also consistent with the purpose of I.C. § 18-2505, which is "to preserve the integrity of Idaho's jails and penal institutions, to deter escapes by those who are lawfully confined in Idaho correctional facilities and to prevent harm to the public that may be effected by such persons while at large." State v. Swisher, 125 Idaho 797, 799, 874 P.2d 608, 610 (Ct.App.1994).
We conclude that Shanks was not "outside the walls of such correctional facility," because he had not yet been placed in a correctional facility when he emerged from the patrol car and fled. Therefore, the district court correctly dismissed the charge.[3]
The district court's order granting Shanks's motion for dismissal of the escape charge is affirmed.
Judge PERRY and Judge GUTIERREZ concur.
NOTES
[1]  While a superficial reading of State v. Rocque, 104 Idaho 445, 660 P.2d 57 (1983), would seem to indicate that I.C. § 18-2505 applies only to persons who have been "sentenced," this would not be an accurate reading of the decision. In Rocque, the defendant had been convicted of burglary and sentenced to a prison term, but his sentence was suspended and he was placed on probation. It was a condition of his probation that he serve six months in jail on work release. The defendant did not return to jail after work and thereby violated his probation terms. He was charged with and convicted of escape, but the Idaho Supreme Court reversed his conviction because the defendant had been voluntarily serving a term in jail as a condition of probation rather than serving a "sentence" of imprisonment, and therefore was not deemed to have been in "custody" when he failed to return to jail.
[2]  Idaho Code § 18-101A(5) states:

"Prisoner" means a person who has been convicted of a crime in the state of Idaho and is either incarcerated or on parole for that crime or in custody for trial and sentencing, or who is convicted of and sentenced for a crime in a state other than the state of Idaho, or under the laws of the United States or other foreign jurisdiction, and who is being housed in any state, local or private correctional facility, or who is being transported in any manner within or through the state of Idaho. The term shall be construed to include references to terms including, but not limited to, "inmate," "convict," "detainee," and other similar terms, and shall include "out-of-state prisoner" and "out-of-state inmate."
[3]  This does not mean that Shanks's departure from the patrol vehicle was not punishable. The facts presented to this Court indicate that he could have been prosecuted for resisting and obstructing officers, I.C. § 18-705.
