
275 P.3d 567 (2012)
Bobby McKINLEY, Appellant,
v.
STATE of Alaska, Appellee.
No. A-10790.
Court of Appeals of Alaska.
May 4, 2012.
Andrew Steiner, Bend, Oregon, for the Appellant. Ann B. Black, Assistant Attorney General, Office of Special Prosecutions and Appeals, Anchorage, and John J. Burns, Attorney General, Juneau, for the Appellee.
Before: COATS, Chief Judge, and MANNHEIMER and BOLGER, Judges.
MANNHEIMER, Judge.
Under AS 12.55.025(c), a sentencing judge must give a defendant credit against their sentence for time spent in custody pending their trial, sentencing, or appeal. In Nygren v. State, 658 P.2d 141 (Alaska App.1983), we interpreted this statute as requiring a court to give a defendant credit for time spent in non-prison residential treatment, if the defendant "is subjected to restrictions approximating those experienced by one who is incarcerated." Id. at 146. We also set forth the criteria that a court should consider when assessing whether a defendant's residence at a facility qualified as "custody" for purposes of AS 12.55.025(c). Ibid.
The Nygren line of cases governed this aspect of Alaska law for close to a quartercentury. Then, in 2007, the legislature enacted a new statute, AS 12.55.027, that defines the situations in which defendants are entitled to credit against their sentences for time spent in these non-prison residential settings.
The question presented in this appeal is whether this statute should be interpreted in accordance with its wording, or whether the statute should be interpreted more broadly than its wording suggests, so that defendants would continue to receive credit against their sentences under the more liberal rule established in the Nygren line of cases.
For the reasons explained here, we conclude that the statute should be interpreted *568 in accordance with its wording, even though the statute may impose a more restrictive rule than is found in the Nygren line of cases.

Underlying facts
The defendant in this case, Bobby McKinley, was charged with first-degree vehicle theft and second-degree theft. While he was awaiting trial on these charges, as a condition of McKinley's bail, the superior court required him to enter a residential treatment facilitythe Salvation Army's adult rehabilitation program. McKinley entered the Salvation Army program on December 4, 2008, and he stayed there for five months, until he was discharged on May 3, 2009.
In April of the following year (2010), McKinley's criminal case was resolved: he pleaded guilty to the vehicle theft charge, and he received a sentence of 60 months' imprisonment with 42 months suspended (i.e., 18 months to serve). On the same day that he received this sentence, McKinley filed a motion asking the superior court to give him 5 months' credit against this sentence for the time he spent in the Salvation Army residential program.
Superior Court Judge Jack W. Smith concluded that McKinley's motion was governed by the provisions of AS 12.55.027, and that the question of whether McKinley was entitled to credit against his sentence hinged on whether the Salvation Army treatment program satisfied the requirements set forth in AS 12.55.027(c).
During the litigation of this question, the primary issue was whether the Salvation Army program met the requirement set forth in subsection (c)(2) of the statutethat participants in the program "be confined at all times to the grounds of the facility[,] or be in the physical custody of an employee of the facility, except for court appearances, meetings with counsel, and work required by the treatment program and approved in advance by the court".
The Salvation Army's director of rehabilitation services, Dean Bundy, submitted a lengthy letter describing the program, and he later supplemented this description with testimony. Based on Mr. Bundy's description of the operation of the program, Judge Smith concluded that McKinley was entitled to only 30 days' credit against his sentence, not 5 months.
According to Bundy's letter and testimony, the Salvation Army program has six phases of treatment, each with differing levels of restriction on the activities of the participants. During the first phase of treatment, participants are essentially forbidden from leaving the facility. However, beginning with the second phase, participants are allowed more freedom. In particular, second-phase participants can be granted "therapeutic" passes to attend outside treatment and counseling sessions such as those offered by AA or NA (Narcotics Anonymous). In fact, the Salvation Army requires participants to attend AA / NA community-based sessions, a minimum of twice per week.
In addition, beginning with the second phase, participants can receive "buddy" passes that allow them to leave the facility for up to three hours (on weekends, up to six hours) in the company of another, more senior program participant. Beginning with the fourth phase, participants are eligible for overnight family visit passes twice per month. And in the sixth phase, participants are eligible for 24-hour therapeutic sponsor passes or family passes, up to twice per month on alternate weekends.
Based on the fact that participants in the Salvation Army program are permitted to leave the facility without staff supervision beginning with the second phase of their treatment, Judge Smith concluded that only the first phase of the Salvation Army's program satisfied the requirements of AS 12.55.027(c)(2). Accordingly, he gave McKinley credit against his sentence for this first phase onlya total of 30 days.
Judge Smith noted that the requirements of subsection 027(c)(2) were more restrictive than the Nygren line of cases. Under Nygren, a defendant might receive credit against their sentence even though the defendant's treatment program granted participants unsupervised absencesas long as those absences were of specified duration and for specified purposes. See Nygren v. *569 State, 658 P.2d 141, 146 (Alaska App.1983) (stating that one of the criteria of a qualifying residential program was that "any periods during which residents [are] permitted to leave the facility [must be] expressly limited, both as to time and purpose").
(We applied this rule in Potter v. State, unpublished, Alaska App. Memorandum Opinion 4569 (May 1, 2002), 2002 WL 818059. In Potter, we held that the defendant was entitled to credit against his sentence for time spent at the Cordova Community Residential Center, even though he was permitted various unsupervised absences from the facility. We noted that Potter "could leave the facility only with authorization", and that he "was required to travel directly to and from an approved location." Id. at *2.)
Judge Smith also indicated that he believed that AS 12.55.027(c) was so restrictive that it defeated some of the policies it was intended to promote. The judge explained:

The Court: [O]ne of the underlying goals of incarceration is rehabilitation, [and] it is essential to foster a system that provides opportunities for drug and alcohol treatment, life skills training, and education.
The reality is that the prisons and jails... provide few opportunities for inmates to better themselves and their future quality of life. [On the other hand], programs such as [the Salvation Army program], Akeela House, etc., are designed to provide treatment and support for every step of the rehabilitation process.
[Because AS 12.55.027(c) forces] defendants to choose between [staying in] prison and receiving credit for time served, and going to a treatment program where they will not receive credit, [this] creates a disincentive for seeking necessary treatment.
... [A]lthough [the Salvation Army program allows] opportunities for unsupervised leave, it also imposes rigid restrictions on participants: hourly bed checks, significant time confined to the facility, daily drug tests, hours of required classes[.] [It also offers] programs including, but not limited to, drug and alcohol treatment, GED, fatherhood [training], anger management, and spirituality training.
Nevertheless, Judge Smith concluded that he was required to apply the statute as written, and that McKinley was therefore not entitled to credit against his sentence for the second and subsequent phases of his residence at the Salvation Army programbecause, during those phases of his treatment, McKinley was granted unsupervised absences from the facility for various purposes.
Accordingly, Judge Smith granted McKinley credit against his sentence for the 30 days he spent in the first phase of the Salvation Army's program, but the judge denied McKinley credit for the second and subsequent phases (the remaining 121 days).

The legislative history of AS 12.55.027
AS 12.55.027 began life as section 6 of the House Judiciary Committee's Substitute for House Bill 90 (25th Legislature). Although this bill was sponsored by Representative Ralph Samuels, portions of the bill were drafted by the Department of Law.[1] Rep. Samuels introduced a representative of the Department, Assistant Attorney General Anne Carpeneti, who proceeded to describe the proposed bill section by section.[2]
In her remarks to the Committee, Ms. Carpeneti explained that section 6 of the billthe portion that ultimately became AS 12.55.027"would enact standards that the courts must follow [when] deciding ... whether to give credit against a term of imprisonment for time spent in a treatment facility".[3] According to Carpeneti, the standards proposed in section 6 of the bill "follow[ed] decisional law to a great degree".[4]
Carpeneti explained that the Department of Law's rationale for proposing this statute was to make sure that "judges throughout the state [were] reasonably consistent when *570 granting credit against a term of imprisonment".[5] According to Carpeneti, the standards set forth in section 6 "pretty much mirror[ed] what the courts have [already] set out in Nygren".[6]
However, under the version of the bill that the Department of Law was proposing, a defendant would not receive credit against their sentence for participation in a residential treatment program unless the defendant was "confined at all times to the grounds of the facility or [was] in the physical custody of an employee of the facility".[7] As we explain later in this opinion, this provision was more restrictive than the Nygren line of cases.
When Committee Chair Jay Ramras suggested that the bill's criteria for treatment programs were "too specific", given the treatment programs currently available, Ms. Carpeneti responded that the proposed bill would not limit a sentencing court's authority to "fashion the [defendant's] sentence based on a particular program".[8]
This response was technically true, but not responsive to Representative Ramras's concerns. The proposed bill did not deal with a judge's sentencing authority. Rather, it dealt with the question of whether defendants would receive credit against their sentences for the time they spent at a residential treatment program to which they were committed as a condition of release.
When Rep. Ramras continued to express reservations about the content of the proposal, Carpeneti assured him that the proposed statute "merely reflect[ed] past court rulings".[9]
Steve Christopher, chief operations manager of Alaska Monitoring Services, suggested that the wording of subsection (c)(2) would be counter-productive, because it would require the employees of a treatment program to personally escort defendants whenever they left the facility for any purpose.[10] Mr. Christopher noted that many treatment programs currently allowed defendants to work in the community without an escort.[11] Rep. Samuels responded that, according to the statistics he had seen, treatment programs made no difference to recidivism ratesand he observed that "[people] who are in jail are not committing crimes while [they are] there".[12]
Rep. Ramras then asked Christopher if the language of subsection (c)(2)that is, the requirement that program participants never leave the grounds of the facility unless they were personally supervised by a staff memberwould affect the operation of the halfway house in Fairbanks. Christopher said that he did not know, but he pointed out that the halfway house currently did not have enough staff to escort all of its clients whenever they went out into the community, as would be required by subsection (c)(2).[13]
Quinlan Steiner, the Director of the Public Defender Agency, added that subsection (c)(2)the requirement that a defendant be in the physical custody of a staff member whenever the defendant was not within the grounds of the facilitymight make it unreasonably difficult for a defendant to visit their attorney or attend court hearings, due to a lack of sufficient staff.[14] Joshua Fink, the Director of the Office of Public Advocacy, added that subsection (c)(2) would create a similar difficulty for participants in the Salvation Army's treatment program, because that program required participants to have a job.[15] He urged the Committee to contact the various treatment providers to find out what types of out-of-facility activities were required by their treatment programs.[16]
*571 Three days later, during the Judiciary Committee's continued hearing on HB 90, Rep. Samuels offered an amendment to subsection (c)(2) which made exceptions to the rule that defendants had to be personally supervised by staff whenever they left the grounds of the facility. Under this amendment, defendants would have to be "confined at all times to the grounds of the facility or be in the physical custody of an employee of the facility, except for court appearances or meetings with counsel".[17] This amendment was approved without objection.[18]
Apparently prompted by this amendment to subsection (c)(2), Rep. Ramras offered an additional amendment that would allow a treatment program to qualify for later credit against a defendant's sentence even if the defendant was allowed to leave the facility grounds unsupervised, as long as the absence was for the purpose of "work or traveling to or from work".[19] Rep. Ramras explained that his amendment was intended to cover defendants who participated in treatment programs that required their participants to work as part of the treatment.[20]
Ms. Carpeneti spoke against this proposed amendment. She told the Committee that the Department of Law's position was that Nygren credit (i.e., credit against a defendant's sentence of imprisonment) was supposed to be awarded only for treatment programs that were similar to incarceration and that any treatment program which allowed participants to leave the facility, unsupervised, in order to work was not "similar to incarceration". Thus, Carpeneti argued, defendants should not receive credit against their sentences for time spent at a treatment program if that program allowed them to leave the facility grounds, unsupervised, to engage in employment.[21]
Although Carpeneti's remarks may have accurately reflected the Department of Law's position on this issue, Carpeneti failed to explain that the Department's position was at odds with the existing Nygren case law.
In State v. Fortuny, 42 P.3d 1147, 1150-52 (Alaska App.2002), this Court rejected the State's argument that a defendant should be deemed ineligible for Nygren credit because his residential treatment program allowed him to be absent from the facility, sometimes for up to fifty hours a week, to engage in employment. In Fortuny, we noted that the clinical staff at the defendant's treatment program "view[ed] work release as part of the treatment regimen", id. at 1151, and we held that the defendant "should receive full credit for the days he resided at [the residential treatment program] under court order, even [though] he was authorized to spend many hours away from the treatment facility on work release." Id. at 1152.
After Carpeneti spoke against giving Nygren credit to defendants whose treatment programs allowed them to leave the facility to engage in employment, Representative Max Gruenberg offered a compromise amendment. Under Rep. Gruenberg's proposal, a treatment program would qualify for credit against a defendant's sentence, even if defendants were allowed unsupervised absences from the facility grounds for employment purposes, but only if the defendant's work "[was] part of the treatment program and [was] specifically approved by the court."[22]
Rep. Ramras then repeated his support for this concept. He told the Committee that he knew of a situation where a young offender attended and successfully completed a treatment program, and he wondered what the young offender would have done if the treatment program had contained a work componentspecifically, what the young offender would have done if she had known that, by complying with the work component of the program, she would thereby forfeit the credit against her sentence. Rep. Ramras urged the Committee not to "restrict [treatment *572 alternatives] that will help people become productive members of society".[23]
Shortly afterwards, Representative Lindsey Holmes told the Committee that Mr. Steiner had handed her proposed wording for a revised subsection (c)(2).[24] Under this proposal, (c)(2) would state that defendants participating in qualifying treatment programs
must be confined at all times to the grounds of the facility or be in the physical custody of an employee of the facility, except for court appearances, meetings with counsel, and for work as required by the treatment program[.][25]
Rep. Samuels spoke in opposition to this proposal. Echoing Carpeneti's earlier comments, Rep. Samuels argued that if a person was able to work off-site while attending a treatment program, this "[was] not like being in jail", and people in this situation should not receive credit against their sentence.[26]
Rep. Gruenberg then renewed his proposal for the compromise language, "unless the person is at work or traveling to or from work as required by the treatment program and as specifically approved by the court".[27] There was no objection to Rep. Gruenberg's proposal, and it was adopted.[28]
A few minutes later, House Bill 90 (as just amended) was passed out of the Judiciary Committee.[29] Section 6 of this billthe provision that engendered so much debatewas ultimately enacted as SLA 2007, chapter 24, § 20, and it became AS 12.55.027.
The final version of AS 12.55.027(c)(2) contains the language that was hammered out in the House Judiciary Committee:
(c) To qualify for credit against a sentence of imprisonment for time spent in a treatment program, the treatment program... must impose ... restrictions on a person's liberty [which include] the requirement that a participant in the program
...
(2) must be confined at all times to the grounds of the facility[,] or be in the physical custody of an employee of the facility, except for court appearances, meetings with counsel, and work required by the treatment program and approved in advance by the court[.]
Now that we have described this legislative history, we turn to McKinley's argument on appeal.

McKinley's argument on appeal
Although McKinley asked Judge Smith to give him credit against his sentence for the 151 days he spent in the Salvation Army's residential treatment program, Judge Smith gave McKinley only 30 days' creditthe 30 days that McKinley spent in phase one of the Salvation Army program.
As we have explained, Judge Smith's decision was based on the wording of AS 12.55.027(c)(2). Under this subsection of the statute, a treatment program does not qualify for sentencing credit if the program allows unsupervised absences from the facility for any purpose except the three purposes specified: "court appearances, meetings with counsel, and work required by the treatment program and approved in advance by the court".
McKinley argues that, despite its wording, subsection (c)(2) was intended to allow other types of unsupervised absences. McKinley points out that Assistant Attorney General Carpeneti repeatedly told the House Judiciary Committee that the statute was intended to codify the Nygren line of casesthat the standards set forth in the statute "pretty much mirror[ed] what the courts have [already] set out in Nygren", and that the statute "merely reflect[ed] past court rulings".
*573 As we explained earlier, under the Nygren line of cases, a treatment program will qualify for Nygren credit even if program residents are allowed to leave the facility without immediate personal supervision, so long as "[the] periods during which residents [are] permitted to leave the facility are expressly limited, both as to time and purpose". Nygren, 658 P.2d at 146; see also Fortuny, 42 P.3d at 1151-52. Based on this, McKinley suggests that we should interpret subsection (c)(2), not according to its wording, but according to the Nygren rule.
But even if the Department of Law was mistaken in telling the House Judiciary Committee that their proposed statute was simply a codification of the Nygren rule, this does not mean that we can disregard the wording of the statute and continue to apply the Nygren rule. The true question here is whether that the Department of Law's description of the proposed statute misled the Committee as to the meaning of the language contained in subsection (c)(2) of the statute. And the record of the proceedings in front of the Judiciary Committeein particular, the debate over the precise wording of subsection (c)(2)demonstrates that the Committee members fully understood the restrictions they were placing on the types of treatment programs that would qualify for sentencing credit.
As we have explained, the Department of Law's original proposal was that no unsupervised absences would be allowedand everyone understood the provision to mean exactly that.
Various members of the Judiciary Committee, as well as various people testifying in front of the Committee, criticized this approach on the ground that (1) there were valid reasons for allowing program participants to leave the grounds of the treatment facility, and (2) treatment programs simply did not have sufficient numbers of staff to satisfy the requirement that every off-facility activity be personally supervised by a staff member.
To answer these concerns, the Committee first amended the Department of Law's wording to allow unsupervised absences for court hearings and meetings with attorneys. Then some Committee members argued in favor of expanding the language again, this time to include absences for off-site work, because many treatment programs had work components. The Committee finally reached a compromise solution on this issueallowing unsupervised absences for work, but only if the treatment program required the work, and only if the sentencing court approved it.
In other words, even though the final version of subsection (c)(2) is more restrictive than the Nygren rule it superseded, and even though the Committee members might not have understood that they were changing the law, it is clear that the Committee members understood the meaning of subsection (c)(2)specifically, that unsupervised absences from treatment programs would be strictly limited to the three purposes specified in the statute.
As Judge Smith noted when he issued his decision, there may be good reasons to allow other types of unsupervised absences from treatment programs. As the judge observed, one of the underlying goals of penal administration is the rehabilitation of offenders and, to achieve this, goal, it would doubtless be better to foster opportunities for drug and alcohol treatment, education, and training in life skills.
It is unrealistic to expect that every treatment program will have the funding and the trained personnel to offer all of these opportunities to its residents. And it may be unrealistic to expect that every treatment program will be able to hire a sufficient number of staff to personally supervise every resident who wishes to take advantage of off-site opportunities for treatment, education, and training.
But whether to expand the scope of allowed unsupervised absences under AS 12.55.027(c)(2) is a matter of policyand, therefore, the decision is up to the legislature, not the judiciary. It was Judge Smith's duty to apply the statute as the legislature intended. And the legislative history of AS 12.55.027 makes it clear that the rule intended by the legislature is not as broad as the rule contained in the Nygren line of cases.


*574 Conclusion

The judgement of the superior court is AFFIRMED.
NOTES
[1]  Minutes of the House Judiciary Committee for April 10, 2007 @ 1:13:33.
[2]  Minutes, House Judiciary Committee, April 10, 2007 @ 1:11:26.
[3]  Id. @ 1:26:34.
[4]  Ibid.
[5]  Ibid.
[6]  Ibid.
[7]  Ibid.
[8]  Ibid.
[9]  Id. @ 1:33:11.
[10]  Id. @ 2:17:46.
[11]  Ibid.
[12]  Ibid.
[13]  Ibid.
[14]  Id. @ 2:41:36.
[15]  Id. @ 2:57:24.
[16]  Ibid.
[17]  Minutes of the House Judiciary Committee for April 13, 2007 @ 2:19:00.
[18]  Ibid.
[19]  Id. @ 2:23:08.
[20]  Ibid.
[21]  Ibid.
[22]  Id. @ 2:27:28.
[23]  Ibid.
[24]  Id. @ 2:30:39.
[25]  Ibid.
[26]  Ibid.
[27]  Ibid.
[28]  Ibid.
[29]  Id. @ 2:37:56.
