dissenting.
Because I believe that Hale met his burden of proof of showing that he is being illegally detained in the Fulton County work release program (“the work release program”) and, as a result, is entitled to immediate release, I respectfully dissent.
I. Credit Time
Credit time is a statutory reward for a lack of conduct that is in violation of institutional rules. State v. Mullins, 647 N.E.2d 676, 678 (Ind.Ct.App.1995). “The purpose of the legislature in enacting ‘good time’ credit statutes was to encourage inmates of penal institutions to behave well while confined, to improve their morale, and thus to help the prison authorities to maintain order and control.” State v. Eckhardt, 687 N.E.2d 374, 376 (Ind.Ct.App.1997) (citing Dunn v. Jenkins, 268 Ind. 478, 485, 377 N.E.2d 868, 873 (1978)). Receipt of credit is based upon the behavior of the confined and is conditional upon continued good behavior and may be revoked. Mullins, 647 N.E.2d at 678. Credit time is earned toward release from institutional placement or confinement. See generally id.
A. Whether Hale Earned Credit Time for Time Served in Work Release
Indiana Code section 35-38-2.6-6 explicitly provides that a person who is placed in a community corrections program is entitled to earn credit time. Work release is a community corrections program and, as such, falls under Indiana Code section 35-38-2.6-6. “A person who is not a credit restricted felon and who is imprisoned for a crime ... is initially assigned to Class I.” Ind.Code § 35-50-6-4(a). “A person assigned to Class I earns one (1) day of credit time for each day the person is imprisoned for a crime.” Ind.Code § 35-50-6-3(a).
Hale argues that he was entitled to earn credit time for the time he was confined in the work release program. For its part, the State concedes that Hale was entitled to earn credit time for the time he was confined in the work release program, and that it was irrelevant whether Hale was placed in the program as a direct placement or a condition of probation.
B. Application of Credit Time Earned
Again, credit time is earned toward the release from institutional placement or confinement. See generally Mullins, 647 N.E.2d at 678. Generally, under the statutory provisions regarding release from imprisonment and credit time, a person should be released when he completes his ordered term of imprisonment or confinement less the credit time earned. See *858generally Ind. Law Encyc, Prisons and Reformatories § 24 (citing Ind.Code §§ 35-50-6-1 to 85-50-6-8; Ind. Law En-cyc, Pardon and Parole § 7). It follows that in order for the purpose of the credit time statutes to be fulfilled, credit time earned should be applied to the term of confinement for the type or level of confinement for which it was earned. To apply credit time in any other manner would arguably be inconsistent with the statutorily created incentive for individuals to behave according to institutional rules while confined in the particular penal institution.
In the instant matter, Hale earned credit time while confined in the work release program. Nothing in the record indicates that Hale was placed in any class other than Class I, that he did not exhibit “good behavior” while serving his sentence in the work release program, or that any of his earned credit time was revoked by the restraining authority. As such, Hale was entitled to earn one day of credit for each day served. Pursuant to the above stated authorities and in consideration for fulfilling the purpose of the credit time statutes, I would conclude that the time earned by Hale while confined in the work release program should be applied to the term for which he was ordered to be confined in the work release program. In my view, any other application would be inconsistent with the intent of our legislature.
II. Hale’s Request for Immediate Release from the Work Release Program
Hale filed a verified petition seeking a writ of habeas corpus before the habeas court arguing that he was being unlawful confined in the work release program. Specifically, Hale argued that he was entitled to immediate release from the work release program because he had completed the term of confinement that was ordered by the trial court.
A. Habeas Corpus
Indiana Code section 34-25.5-1-1 states: “Every person whose liberty is restrained, under any pretense whatever, may prosecute a writ of habeas corpus to inquire into the cause of the restraint, and shall be delivered from the restraint if the restraint is illegal.” Ind.Code § 34-25.5-1-1 (1998). “The purpose of the writ of habeas corpus is to bring the person in custody before the court for inquiry into the cause of restraint.” O’Leary v. Smith, 219 Ind. 111, 113, 37 N.E.2d 60, 60 (1941); see also Turner v. O’Neal, 237 Ind. 258, 259-60, 145 N.E.2d 1, 2 (1957); Bryarly v. Howard, 225 Ind. 183, 186, 73 N.E.2d 678, 679 (1947). “One is entitled to ha-beas corpus only if he is entitled to his immediate release from unlawful custody.” Hawkins v. Jenkins, 268 Ind. 137, 139, 374 N.E.2d 496, 498 (1978); see also Young v. Duckworth, 274 Ind. 59, 61, 408 N.E.2d 1253, 1254 (1980); Dunn v. Jenkins, 268 Ind. 478, 479-80, 377 N.E.2d 868, 870-71 (1978) (holding that a “prisoner can only obtain a discharge through habeas corpus relief, not a modification of his commitment”) (citations omitted); Hendrixson v. Lash, 258 Ind. 550, 282 N.E.2d 792 (1972). Lastly, a petitioner may not file a writ of habeas corpus to attack his conviction or sentence. Hawkins, 268 Ind. at 140, 374 N.E.2d at 498 (citing Ind. Post-Conviction Rule l(l)(c)) (stating that a writ of habeas corpus that attacks a conviction or sentence must be transferred to the court of conviction and treated as though filed as a post-conviction relief petition).
Partlow v. Superintendent, Miami Corr. Facility, 756 N.E.2d 978, 980 (Ind.Ct.App.2001).
*859We review the trial court’s habeas decision for an abuse of discretion. Benford v. Marvel, 842 N.E.2d 826, 828 (Ind.Ct.App.2006). Without reweighing the evidence, this court considers only that evidence most favorable to the judgment and reasonable inferences drawn therefrom. Id.
Hardley v. State, 893 N.E.2d 740, 742 (Ind.Ct.App.2008). Indiana adheres to the rule that in reviewing a writ of habeas corpus, courts are limited to the trial court’s intrinsic record. De Hart v. Blande, 233 Ind. 659, 660, 122 N.E.2d 90, 91 (1954).
A complaint for a writ of habeas corpus must specify (1) who is restraining the applicant’s liberty, the place where the applicant is being held, and the names of all the parties, if they are known, or descriptions of them if they are not known; (2) the cause or pretense of the restraint, according to the best of the knowledge and belief of the applicant; (3) if the restraint is alleged to be illegal, the nature of the illegality. Ind.Code § 34-25.5-2-1. If the facts stated in a complaint for a writ of habeas corpus make a prima facie ease in the applicant’s favor, the burden shifts to the confining authority to make a return in which the confining authority must present evidence showing that the applicant’s confinement is not illegal. See generally Willis v. Bayles, 105 Ind. 363, 365, 5 N.E. 8, 9 (1886). If the confining authority’s return to the complaint is found to be insufficient, the applicant is entitled to be released from confinement. Holland v. Raisor, 256 Ind. 286, 288-89, 268 N.E.2d 102, 104 (1971).
In the instant matter, Hale’s verified petition stated that he had been confined in the work release program for more than one year and that he had earned one day of credit time for each day served. The confining authority did not present a return containing any evidence that would disprove the statements contained in Hale’s verified petition. As such, Hale’s complaint was sufficient to make a prima facie showing that he was entitled to immediate release because he had completed his two-year term of confinement in the work release program.8 See generally Willis, 105 Ind. at 365, 5 N.E. at 9. Because Hale is entitled to immediate release from the work release program, I would conclude that the habeas court abused its discretion in denying Hale’s complaint seeking a writ of habeas corpus, and, accordingly, would reverse the judgment of habeas court.
. Moreover, I agree with the majority’s conclusion that it was error for the habeas court, which also happened to be the trial court, to rely on information outside the record, i.e., its memory of the sentence it intended to impose rather than the sentence reflected by the sentencing order, to amend Hale’s sentence.