OPINION
BROWN, Judge.Derek Hale appeals the trial court’s order on his Verified Petition for Writ of Habeas Corpus. Hale raises two issues which we consolidate and restate as whether the court abused its discretion when it entered its order clarifying Hale’s sentence. We reverse and remand.
FACTS AND PROCEDURAL HISTORY
On January 25, 2010, the State charged Hale in the Fulton Superior Court with Count I, dealing methamphetamine within 1,000 feet of a public park as a class A felony; Count II, possession of methamphetamine within 1,000 feet of a public park as a class B felony; and Count III, illegal drug lab as a class C felony. On June 7, 2011, Hale and the State filed a written plea agreement, in which Hale agreed to plead guilty to Count II and the State agreed to dismiss Counts I and III. The agreement stated the following regarding sentencing:
There is no agreement as to the sentence to be imposed by the Court except that the parties do agree that no more than six years of any sentence may be executed time, with the parties being otherwise free to present evidence and make argument for any sentence within that limitation and allowed by law. The Court may suspend any portion of the sentence, including a sentence in excess of the six year limit on executed time, and the limitation on the amount of the executed sentence shall not apply to any suspended sentence if there is a subsequent proceeding for revocation of probation, but rather only applies at the time of the original sentencing.
Appellant’s Appendix at 10. On June 22, 2011, the court, by Judge Wayne E. Steele, held a guilty plea hearing, Hale pled guilty to Count II, and the court took the plea agreement under advisement.
On November 22, 2011, the court accepted the plea agreement, entered a judgment of conviction for Count II, possession of methamphetamine as a class B felony, dismissed Counts I and III, and held a sentencing hearing. In pronouncing sentence, Judge Steele stated that he would impose an advisory term of ten years and stated specifically:
The Court is persuaded, I think, that the ten-year sentence, I’m gonna split up this way — and I don’t routinely do this, so — but the Court will order that you serve two years on work release, followed by a year on home detention; and that there’ll be five years then remaining of straight probation.
Transcript at 60. That same day, the court entered its written order of judgment of conviction, consisting of a general *851form which the court filled out by hand, noting that Hale would be sentenced to ten years suspended including five years of probation for Count II, and, under a section labeled “Other,” noted: “[Hale] to serve two (2) years on work release beginning Nov 28, 2011 at 8:00 am at FCJ followed by 1 year home detention.”1 Appellant’s Appendix at 12.
On December 19, 2012, Hale filed a Verified Petition for Writ of Habeas Corpus in the Fulton Superior Court stating:
1. This Petition is made and writ applied for on behalf of Derek Hale, who is unlawfully restrained of his liberty and falsely imprisoned in the Fulton County Jail, by Respondent, Walker Conley, herein in his capacity as Fulton County Sheriff.
2. To the best of [Hale’s] knowledge and belief, he is being held in said facility on the following basis:
a. On or about the 22nd day of November, 2011, [he] was sentenced in Cause Number 25D01-1001-FA-00043;
b. In pertinent part, [he] received a ten year suspended sentence with five years suspended to probation;
c. As a condition of [his] probation, he was ordered to serve two years on work release beginning November 28, 2011, at 8:00 a.m. at the Fulton County Jail followed by one year of in-home detention;
3. The detention is illegal for the following reasons:
a. As of November 28, 2012, [he] served one actual year (365 days) in the Fulton County Work Release Program;
b. Pursuant to I.C. 35-50-6-6, I.C. 35-38-2.5-5 and the case of Peterink v. State, 971 N.E.2d 735 [ (Ind.Ct.App.2012) ], [he] should have received one additional day of good time credit for each day served beginning on November 28, 2011, to the present;
c. As of the date of this Writ, Defendant Hale has served at least twenty (20) actual days in the Fulton County Jail in excess of the sentence handed down by the Court on November 22, 2011.
4. No previous application has been made for this Writ or the relief sought;
5. [Hale] is entitled to immediate release from the unlawful detention.
Id. at 13-14. Hale requested that the court “issue a Writ of Habeas Corpus directing Sheriff of Fulton County, Indiana, Walker Conley, to release [Hale] from the Fulton County Work Release Program,” direct Hale to “communicate with the appropriate Community Corrections Officer to immediately begin service of his one year of In-Home Detention,” and to further apply any additional time served credit to his in-home detention time. Id. at 14.
On January 2, 2013, the court, again by Judge Steele, held a hearing on Hale’s petition2 at which, following arguments of *852the parties, the court indicated that it intended to sentence Hale to “two years of actual time on work release and one year of actual time on home detention” which would have complied with the six-year cap on any executed time. Transcript at 76. The court also indicated it intended to “listen to the sentencing order and go back and look at the file” and that it would then enter an order on the petition. Id. at 78.
On January 4, 2018, the court entered the following order:
Parties appear for hearing on [Hale’s] Verified Petition For Writ of Habeas Corpus.... The Court being duly advised finds as follows:
1. The Sentencing Order of November 22, 2011 is clarified by the Court to read two (2) actual years of work release followed by one (1) actual year on home detention as terms and conditions of probation which was the original intent of the Court. If [Hale] is to receive credit time and good time credit the work release would be four (4) years and home detention two (2) years.
2. The Court sentenced [Hale] to a ten (10) year sentence which was suspended and [] placed [Hale] on probation for five (5) years with certain terms and conditions.
3. This sentence complies with the statutory sentence for a Class B felony and with [Hale’s] plea agreement to a Class B felony that had no agreement as to sentence except a six (6) year cap of any executed sentence.
Appellant’s Appendix at 15.
ISSUE/STANDARD OF REVIEW
The issue is whether the court abused its discretion when it entered its order clarifying Hale’s sentence. “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 § 84-25.5-1-1. The purpose of a writ of habeas corpus is to determine the lawfulness of the defendant’s detention. Hardley v. State, 893 N.E.2d 740, 742 (Ind.Ct.App.2008). A trial court must provide a writ of habeas corpus if a petitioner is unlawfully incarcerated and entitled to immediate release. Id. “[A] petitioner may not file a writ of habe-as corpus to attack his conviction or sentence.” Partlow v. Superintendent, Miami Correctional Facility, 756 N.E.2d 978, 980 (Ind.Ct.App.2001) (citing Hawkins v. Jenkins, 268 Ind. 137, 140, 374 N.E.2d 496, 498 (1978) (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))).
We review for an abuse of discretion the trial court’s decision regarding the defendant’s petition. Id, We do not reweigh the evidence, and we consider only the evidence most favorable to the judgment and the reasonable inferences drawn therefrom. Id. Any conclusions regarding the meaning or construction of law are reviewed de novo. Beam v. Wausau Ins. Co., 765 N.E.2d 524, 528 (Ind.2002), reh’g denied.
ANALYSIS
We first note that here, it appears that a petition for habeas corpus relief was an acceptable vehicle for Hale to bring this challenge. We also note that the Indiana Supreme Court has observed that home detention is not a form of incarceration, and Hale’s petition challenged his eontin-*853ued placement on work release and argued that he should have been transferred to home detention. See Smith v. State, 971 N.E.2d 86, 88 (Ind.2012) (noting that the court credited the defendant for certain days he had spent incarcerated as well as certain days he served on home detention).
Next, we observe that the trial court did not follow the relevant procedures for ha-beas corpus petitions and, although we find that any procedural error on the court’s part does not affect the eventual outcome of Hale’s challenge, we discuss such procedures more generally. We note that the writ of habeas corpus itself is employed to bring a person before a court, although courts frequently use the term “writ” in reference to orders issued following hearings on petitions for habeas corpus, see, e.g., Randolph v. Buss, 956 N.E.2d 38, 40 (Ind.Ct.App.2011) (“After a hearing, the trial court denied Randolph’s petition.”), trans. denied, technically a court does not hold a hearing on a defendant’s “petition” for habeas corpus. See Baldi v. State, 908 N.E.2d 639, 641 (Ind.Ct.App.2009) (“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.”) (quoting O’Leary v. Smith, 219 Ind. 111, 113, 37 N.E.2d 60, 60 (1941)), reh’g denied; see generally Holland v. Raisor, 256 Ind. 286, 287, 268 N.E.2d 102, 103 (1971) (observing that the appellant filed a petition for writ of habeas corpus, that the next day the writ was issued commanding the appellee to have appellant before the court for the purpose of conducting a hearing on the matter, and that prior to the hearing the sheriff filed his return to the writ), reh’g denied.
Specifically, Ind.Code § 34-25.5-2-1 allows for applications for writs of habe-as corpus. Ind.Code § 34-25.5-2-2(a) provides that “[w]rits of habeas corpus may be granted by” circuit or superior courts of the county in which the person applying for the writ may be restrained, or, if the judges of those courts are absent or unable to hear the application, by any judge of an adjoining circuit. Ind.Code § 34-25.5-2-2(b) provides that “[u]pon application, a writ granted under subsection (a) shall be granted without delay.”3 Further, Ind. Code § 34-25.5-2-4 provides that “[t]he writ shall be directed to the office or party restraining the applicant, commanding the party to have the applicant before the court or judge... ,”4 Next, the confining *854authority files a return stating the cause of restraint and includes a copy of the authority for restraining the person, Ind. Code § 34-25.5-3-5. The court then proceeds with a hearing to determine the cause of the restraint and judge its legality. Ind. Code § 34-25.5-1-1.
In the instant case, the court held a hearing on the petition filed by Hale and heard the arguments of the parties. Indeed, despite the fact that the court did not issue a writ of habeas corpus, it “proceeded as if it had done so.” Masden v. State, 265 Ind. 428, 432, 355 N.E.2d 398, 401 (1976). As noted above, there was not a disagreement about how many days Hale had served on work release, and the arguments revolved around questions regarding the interpretation of the original sentencing statement which the court examined, whether Hale was entitled to good time credit, the impact any good time credit would have on his aggregate sentence, and how his sentence should be served between work release, home detention, and straight probation. The court ultimately issued its order which neither granted nor denied Hale’s petition — rather, it merely “clarified” Hale’s sentence, which, for reasons discussed below, was improper. However, despite these deficiencies we find no error or defect in the proceedings affecting Hale’s substantial rights.5 Id., 355 N.E.2d at 401.
Hale contends that although the court’s original sentencing order is unclear regarding whether he is serving his work release portion of his sentence as a direct commitment or as a condition of probation, in either case he is entitled to credit time. He notes that this court recently awarded credit time to a defendant serving a sentence on home detention as a condition of probation, and that the same should apply to work release, which is a “more intensive form of supervision than in-home detention.” Appellant’s Brief at 7 (citing Peterink v. State, 971 N.E.2d 735 (Ind.Ct.App.2012), summarily aff'd in relevant part, 982 N.E.2d 1009, 1010 (Ind.2013)). Hale asserts that the court’s order in which it attempted to clarify his sentence had the effect of denying him such credit time and that, as a consequence, he should be “transitioned from Work Release to In-Home Detention.” Id. at 8. He maintains that Indiana case law is clear “that ‘[a] trial judge has no authority over a defendant after he pronounces sentence,’ ” and that specifically, the Indiana Supreme Court has explained that following sentencing, jurisdiction over the defendant lies with the Department of Correction, and “[t]here *855is no authority for a trial court to reopen a [sentence] after its imposition.... ” Id. at 8-9 (quoting Dier v. State, 524 N.E.2d 789, 790 (Ind.1988)). Hale further argues that the court’s clarification was actually an impermissible sentence modification following sentencing.6
The State argues that the court clarified its sentencing order when it highlighted “the six-year cap on the executed portion” of the plea agreement and noted its intention to sentence Hale to “two actual years on work release and one actual year in home detention,” and accordingly the court made it “clear” that it “meant to give [Hale] good time credit for both” portions of his sentence. Appellee’s Brief at 3-4. The State’s position is that the court had jurisdiction to clarify Hale’s sentence when Hale filed his petition in the Fulton Superior Court and the court acquired personal and subject matter over him “to explain to [Hale] the cause of his restraint.” Id. at 5.
Our analysis begins by noting the circumstances of events at the trial court level. On November 22, 2011, Judge Steele initially sentenced Hale to a term of ten years suspended with five years of probation, noting that Hale would serve two years on work release in the Fulton County Jail, followed by one year of home detention with “five years then remaining of straight probation,” for possession of methamphetamine as a class B felony. Transcript at 60. The sentence was pursuant to a plea agreement which provided a “six year limit on executed time.” Appellant’s Appendix at 10. On December 19, 2012, Hale filed his Verified Petition for Writ of Habeas Corpus in the same Fulton Superior Court pursuant to Ind. Code § 34—25.5—2—2(a)(1), which provides that writs of habeas corpus may be granted by “the circuit or superior courts of the county in which the person applying for the writ may be restrained of his or her liberty-” (Emphasis added). Thus, when Hale filed his verified petition in the Fulton Superior Court, he did so because he was serving his work release in the Fulton County Jail, not because the Fulton Superior Court originally sentenced him. Accordingly, it was only by circumstance that Hale’s habeas petition was before Judge Steele, and to the extent that Judge Steele “clarified” Hale’s sentence based upon his own recollection of what sentence he intended to impose, rather than examining the sentencing order and determining from it whether Hale was being detained illegally, we find that Judge Steele abused his discretion in ruling upon that petition. Cf. Sanders v. State, 638 N.E.2d 840, 841 (Ind.Ct.App.1994) (“Generally, a trial judge has no authority over a defendant after he or she pronounces sentence.”) (citing Dier, 524 N.E.2d at 790); State v. Fulkrod, 735 N.E.2d 851, 852 (Ind.Ct.App.2000) (“Any continuing jurisdiction after final judgment has been pronounced must either derive from the judgment itself or be granted to the court by statute or rule.”) (citing Schweitzer v. State, 700 N.E.2d 488, 492 (Ind.Ct.App.1998), trans. denied), reh’g denied, summarily aff'd, 753 N.E.2d 630, 633 (Ind.2001).
We therefore turn to the trial court’s sentencing order to discern whether Hale’s continued detention in the Fulton County Jail is illegal, and we first address whether the work release and home deten*856tion portions of his sentence were to be served as a direct commitment or as conditions of probation. The judgment of conviction, which is again a form the court filled out by hand, notes under its sentence on Count II that Hale was sentenced to ten years suspended, including five years of probation. Following that portion of the form, there is a double line, and below that double line the form contains multiple fields in which the court could enter check-marks to indicate that certain text would apply to the sentence, including whether: 1) the sentence would run concurrent or consecutive to another Cause Number; 2) the defendant was entitled to credit for time served and, if so, how many such days; 3) a defendant’s driver’s license was suspended and for how long; 4) certain counts were dismissed; 5) a public defender’s appearance was withdrawn; 6) additional terms of probation would apply, and including a list from (a) to (m); and 7) a field labeled “Other:” which the court could use to write in other specific aspects of a defendant’s sentence. Appellant’s Appendix at 12. The court checked the field marked “Other:” and wrote: “[Hale] to serve two (2) years on work release beginning Nov 28, 2011 at 8:00 am at FCJ followed by 1 year home detention.” Id. The court did not orally state, nor does the form state, that these terms were to be served as conditions of probation. Thus, Hale was ordered to report to the Fulton County Jail to begin serving his sentence on work release as a direct placement under Ind.Code § 35-38-2.6, and nowhere in the record is the probation department notified to begin oversight of Hale’s sentence on either work release or home detention prior to his discharge from home detention, when he will begin his probationary term.
Having determined that Hale’s work release (as well as his upcoming home detention) term was a direct placement in community corrections, it follows that he is entitled to good time credit. Ind.Code § 35 — 38—2.6—6(b) (“A person who is placed in a community corrections program under this chapter is entitled to earn credit time-under IC 35-50-6.”). This does not lead to the conclusion, however, that Hale is finished with his term of work release and is being detained illegally in the Fulton County Jail.
Again, Hale was sentenced to a term of ten years, all of which were to be served as suspended time. The court ordered that Hale serve his first two years of his term on work release. See Ind.Code § 35-38-2.6-3(a) (“The court may, at the time of sentencing, suspend the sentence and order a person to be placed in a community corrections program....”); Ind.Code § 35-38-2.6-2 (“As used in this chapter, ‘community corrections program’ means a program consisting of residential and work release....”). While serving the work release portion of his sentence, Hale is entitled to credit time which is credited against his aggregate suspended term. Put another way, Hale’s sentence is not divided into executed and suspended portions, in which case the credit time accumulated while serving the executed term accrues against that portion and effects an earlier transition to the suspended portion of the sentence. Here, there is a suspended sentence only, and the court established a timeline on how that sentence is to be served. Thus, upon completion of his two years on work release, assuming Hale is not deprived of any credit time, he will have accumulated a total of four years against his ten-year suspended sentence. Hale will then transition to home detention, where he will serve one year and again will be able to earn one year of credit time. Once that portion of his sentence is complete, assuming no deprivation of credit time, Hale will have *857served a total of six years of his ten-year suspended sentence. He -will then be placed on probation for the remainder of his sentence.7
CONCLUSION
For the foregoing reasons, we reverse the court’s order on Hale’s Verified Petition for Writ of Habeas Corpus, and we remand with instructions that the court enter an order instructing the Fulton County Sheriff to administer Hale’s sentence consistent with this opinion.
Reversed and remanded.
RILEY, J., concurs in result. BRADFORD, J., dissents with separate opinion.. The portion of the form in which the sentence on Count II was entered contained fields with blanks, and in the blank for the sentence imposed the court entered the number "10” (years), and for the suspended portion the court entered the number "10" (years). Appellant’s Appendix at 12. In the field for "Probation” the court entered the number "5” (years). Id. Certain other fields were left blank.
. We observe that although Hale’s counsel appeared at the hearing, Hale was not present. At the outset, Hale’s counsel noted for the court that the hearing had been rescheduled, that he appreciated "the Court putting this on in a prompt manner,” that his staff was unable to notify Hale of the hearing, and that he attempted to phone Hale that morning but found that Hale was presumably "out on the job site....” Transcript at 66. The court *852took judicial notice of the fact that Hale had been incarcerated since November 22, 2011.
. This is not to say, however, that a trial court must grant a petition for writ of habeas corpus. For instance, improper claims brought by a habeas petition may be challenged in a motion to dismiss. Also, courts may summarily deny requests for relief where, upon examination of the petition, it is clear that the petitioner is not requesting immediate relief from incarceration. See Van Meter v. Heath, 602 N.E.2d 143 (Ind.1992) (noting that "The writ of habeas corpus cannot ... be used as a substitute for an appeal" and that "[w]here the proceedings leading to the petitioner's detention are not void by reason of matters apparent on the face of the record, the petitioner’s remedy is by way of appeal”); Baldi, 908 N.E.2d at 640-641 (affirming the trial court’s summary denial of the petitioner's request for relief because he was serving time on a separate conviction, and that he "is not claiming that he was entitled to immediate release from incarceration” but rather was "implying that he was entitled to a reduction of the total amount of his sentence”).
. We also observe that habeas corpus proceedings are civil in nature, rather than criminal, and it was improper for Hale to file his habeas petition under the same criminal Cause Number in which his sentence was issued. Winn v. Fields, 247 Ind. 589, 591, 219 N.E.2d 896, 899 (1966) ("Habeas Corpus is not a criminal proceeding_”). We further discuss this below where we observe that habeas petitions are filed in the court of the county where the petitioner is detained, and it was only by circumstance that Hale's petition was properly filed in the Fulton Superior Court, the same court that sentenced Hale.
. We note that the dissent rests its conclusion on the fact that here "[t]he confining authority did not present a return containing any evidence that would disprove the statements contained in Hale’s verified petition” and that ”[a]s 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.” Infra at 857. However, as the Indiana Supreme Court noted in Masden, "There being no writ in the record, there cannot be a return.” 265 Ind. at 431, 355 N.E.2d at 401; see also Ind. Code § 34-25.5-3-4 ("The sheriff or other person to whom the writ is directed shall return the writ immediately....”) (emphasis added).
We further note that, had the court followed the applicable procedures and issued the writ prior to the hearing, it would have been error for the court to proceed with the hearing in Hale’s absence. Ind.Code § 34-25.5-3-5, the same section governing the return, provides that "[t]he person to whom the writ is directed shall produce the applicant at the hearing unless prevented by sickness or infirmity, which must be shown in the return.” Here, Hale was not produced at the hearing, and the stated reason was that he was at the job site serving his time on work release.
. Hale also notes that although Ind.Code § 35-38-1-17 gives trial courts the authority to alter a defendant’s sentence, it is inapplicable for three reasons including: (1) Section 17 allows courts to only reduce or suspend a defendant’s sentence, not impose a harsher sentence; (2) Section 17 requires the court to act within 365 days and the order here occurred after 365 days had elapsed; and (3) Section 17 requires that the defendant be present and the record is clear that Hale was not present.
. We note that if Hale earns all of his credit time, he will be discharged from probation earlier than the five years thereafter which the court initially ordered. Upon successfully completing the work release and home detention portions of his sentence, he will have four years of probation remaining.