T.G., a juvenile, appeals the district court’s denial of credit for time served while in a residential juvenile sexual misconduct program prior and subsequent to his sentencing. We affirm.
Factual and Procedural Background
T.G. was charged with one count of rape on April 30, 2003. He was placed in a juvenile detention center, and a detention hearing *217was set for May 2, 2003. The journal entry of the detention hearing indicates T.G. was placed in the custody of the Juvenile Justice Authority (JJA) with the “recommendation he remain in detention until placement is available.” On May 20,2003, the JJA placed T.G. at the Marillac Center, where he was enrolled in a juvenile sexual misconduct program.
T.G. filed an “ADMISSION TO CHARGE” in the juvenile case on September 22, 2003. The document, signed by T.G. and witnessed by his counsel, contained the following agreement:
“The State will amend the sole count of the complaint to aggravated indecent solicitation of a child, a violation of K.S.A. 21-3511, a severity level 6 person felony. [T.G.] will stipulate to the amended charge. The parties agree to a 24 month underlying sentence in a juvenile correctional facility, to be stayed for a period of 36 months for placement in JJA custody with authority for out of home placement. Both parties will recommend that [T.G.] receive residential treatment focused on sexual behavior problems.”
The district court accepted T.G.’s plea on the same day. The district court maintained custody with the JJA and ordered a juvenile presentence investigation report (PSI).
The court services officer recommended a minimum term of 18 months in a juvenile correctional facility and 12 months of aftercare. He recommended that the sentence be stayed, that T.G. be kept in JJA custody with authority for out of home placement, and that T.G. be ordered “to complete an approved Sexual Offender treatment program prior to his release from JJA and follow all recommendations of treating physicians and therapists while in custody.”
At sentencing on November 3,2003, the district court sentenced T.G. “to a term of incarceration in Juvenile Correctional Facility for a period of 18 months,” with 24 months of aftercare. The district court further ordered “that the term of incarceration previously imposed herein be stayed and that [T.G.] remain [in] the care, custody and control of the [JJA] with authority for placement.” The district court recommended placement at Marillac. The district court also ordered “that [T.G.] complete the Sexual Offenders Program and follow all the recommendations for treatment and aftercare.”
*218T.G. made initial progress at Marillac, but on November 5,2004, the State filed a motion to “revoke the placement of [T.G.] with the [JJA], that [T.G.] be ordered to serve the sentence previously imposed herein and that [T.G.] be ordered to complete all Sexual Offender counseling available while incarcerated in the Juvenile Correctional Facility.” At a hearing November 15, 2004, T.G/s counsel stipulated that his client had failed to complete the sexual offender treatment program at Marillac. Based on this stipulation, the district court found “no question . . . that [T.G.] is in violation of die order of this Court which had directed the completion of a sex offender treatment program.” The district court said the only remaining issue was “what disposition order can or should be made.”
T.G/s counsel argued his client should receive credit for the time at Marillac because “that placement did occur as a result of a Court order,” and that T.G. “was in fact in custody for purposes of the statute and should receive full credit for time served.” The district court rejected T.G/s argument, however, holding T.G. was not incarcerated because Marillac is a treatment facility. The district court also noted that T.G., as a juvenile, would be in placement somewhere, and “it would work against the terms of tire intended meaning of this statute to allow someone that has been in an alternative placement to get credit for that placement.”
Jurisdiction
Prior to oral arguments, we issued a show cause order requesting that the parties brief whether we had jurisdiction pursuant to K.S.A. 38-1681(c)(2)(B). In particular, we raised the issue of whether T.G. was attempting to impermissibly appeal from a sentence that was the result of an agreement between the State and the defendant which was approved on the record by the sentencing court.
The State argues that “K.S.A. 38-1681(c)(2)(B) specifically states that the appellate court cannot review any sentence resulting from an agreement between the state and the defendant which the sentencing court approves on the record.”
*219T.G. asserts a two-fold argument. First, K.S.A. 38-1681(c)(2)(B) “does not state, however, whether it is referring to agreements as to a specific sentence or simply to agreements regarding a specific offense.” Second, even if the statute applies, “its provisions do not extend to the determination of credit for time served because that determination is a separate and distinct issue having no impact on the sentence imposed.”
We are persuaded that the crux of T.G/s appeal is not to review the propriety of the sentence imposed in this case, but simply to consider whether the district court properly denied T.G. credit for time served prior and subsequent to the sentence imposed. As a result, the provisions of K.S.A. 38-1681(c)(2)(B) do not preclude appellate jurisdiction and we may consider the sole issue of credit for time served.
Credit for Time Served
T.G. maintains the district court was required under K.S.A. 38-16,133 to provide credit for the time he spent at Marillac against the term of his commitment to a juvenile correctional facility. Interpretation of a statute is a question of law subject to unlimited review. State v. Maass, 275 Kan. 328, 330, 64 P.3d 382 (2003).
K.S.A. 38-16, 133 states in part:
“In any action pursuant to the Kansas juvenile justice code . . . the judge, if sentencing the respondent to confinement, shall direct that, for the purpose of computing respondent’s sentence and release, eligibility and conditional release dates thereunder, that such sentence is to be computed from a date, to be specifically designated by the court in the sentencing order. Such date shall be established to reflect and shall be computed as an allowance for the time which the respondent has spent incarcerated pending the disposition of the respondent’s case.” (Emphasis added.)
Although the Juvenile Justice Code does not define the word “incarcerated,” the statutes which authorized T.G/s eventual placement at Marillac provide some definitional guidance. Under K.S.A. 38-1663(a)(4), placement in the custody of the JJA must be accomplished “as provided in K.S.A. 38-1664.” Pursuant to that statute, “[t]he court shall have no power to direct a specific placement by the commissioner, but may make recommendations to the *220commissioner.” K.S.A. 38-1664(b). The JJA has the power to place a juvenile offender in “a community mental health center,” among other options. K.S.A. 38-1664(b).
Regardless of the restrictive life at Marillac, T.G. was not there pursuant to a court order. In the ADMISSION TO CHARGE, T.G. voluntarily requested placement in “residential treatment focused on sexual behavior problems,” and the JJA, which had custody of T.G. after his removal from home, determined the appropriate placement of T.G. was at Marillac. These facts are important to the determination of whether T.G. may be considered to have been incarcerated while at Marillac.
Juvenile proceedings are not part of the criminal code, but the operative clause in K.S.A. 2004 Supp. 21-4614, “time which die defendant has spent incarcerated pending the disposition of the defendant’s case,” is repeated in K.S.A. 38-16,133, with the substitution, in this instance, of “respondent” for “defendant.” In the criminal context, the Kansas Supreme Court recently examined whether a defendant should receive jail time credit under K.S.A. 21-4614 for time spent under “house arrest, where he was electronically monitored and ordered to be locked down’ 24 hours a day.” State v. Guzman, 279 Kan. 812, 814, 112 P.3d 120 (2005).
In Guzman, our Supreme Court analyzed three cases cited by T.G. on appeal, State v. Palmer, 262 Kan. 745, 942 P.2d 19 (1997), State v. Mackley, 220 Kan. 518, 552 P.2d 628 (1976), and State v. Parks, 27 Kan. App. 2d 544, 6 P.3d 444 (2000), not in terms of the restrictions placed on the respective defendants, but on whether they were out of jail on bond. Guzman, 279 Kan. at 814-15. Where, as in Palmer and Paries, the defendants were out on bond, they received no jail time credit. In Mackley, by contrast, the defendant received jail time credit while in court-ordered custody at a state hospital to determine his competency to stand trial. Applying its analysis to the facts in Guzman, our Supreme Court held the defendant there was not entitled to jail time credit:
“Unlike Mackley, Guzman was free on bail, i.e., he had control over his place of custody inasmuch as he had a choice between (1) being released on bond to be in his own home under house arrest and (2) remaining in jail.
*221“Guzman, choosing to be released on bail bond and accepting house arrest with 24-hour-a-day electronic monitoring as additional conditions of release, is not entitled to jail time credit for that period.” 279 Kan. at 815.
Just as in the criminal context a defendant may accept certain restrictions to be out of jail on bond, in the juvenile context a respondent may voluntarily request and agree to certain restrictions to be in the custody of the JJA rather than at a juvenile correctional facility. Guzman suggests that, once a defendant or respondent accepts those restrictions as preferable to incarceration, that individual may not claim those restrictions rendered his or her situation equivalent to incarceration.
Finally, we note that a case similar to the present one was decided by this court in In re W.M., Case No. 90,277, unpublished opinion filed December 24,2003. In that case, W.M. was a juvenile offender who stipulated to the commission of indecent liberties with a child. The issue before the court was whether W.M., upon his later commitment to a juvenile correctional facility was entitled to credit for time previously served while at Maxillae.
In analyzing K.S.A. 38-16,133, Judge Lewis observed: “It is perfectly obvious from reading the statute that a juvenile offender is only entitled to jail time credit for time he or she has spent incarcerated pending the disposition of his or her case.” Slip op. at 3. The determinative factor, the court reasoned, was whether the individual claiming the credit had been sent to that facility pursuant to court order. The court concluded that incarceration as used in K.S.A. 38-16,133 meant placexnent in a facility where the juvenile offender, if he or she escaped, would be subject to a charge of escape from custody in violation of K.S.A. 21-3809 or 21-3810. The critical factor to both statutes was whether the individual was placed at a facility pursuant to court order.
In In re W.M., the court held:
“W.M. was not placed in the treatment facilities by court order. The Juvenile Justice Authority placed him in those facilities in an effort to rehabilitate him. Since he was not in a treatment facility pursuant to court order, he would not be subject to an escape charge if he left the facility; therefore, he was not incarcerated per K.S.A. 38-16, 133 and is not entitled to any credit for time spent in the treatment facilities.” Slip op. at 4.
*222We are persuaded by the reasoning in In re W.M.
In the present case, T.G. willingly entered into a beneficial agreement by which he avoided incarceration by voluntarily seeking “residential treatment focused on sexual behavior problems.” This residential treatment afforded by Marillac was not ordered pursuant to the court, but by the JJA. Whether employing our Supreme Court’s analysis in Guzman or the rationale used in In re W.M., we hold that T.G. was not entitled to credit for time spent at Marillac prior and subsequent to his sentencing.
Affirmed.