
756 N.E.2d 978 (2001)
Darrin W. PARTLOW, Appellant-Defendant,
v.
SUPERINTENDENT, MIAMI CORRECTIONAL FACILITY, Appellee-Plaintiff.
No. 52A04-0103-PC-134.
Court of Appeals of Indiana.
October 5, 2001.
*979 Darrin W. Partlow, Appellant Pro Se.
Steve Carter, Attorney General of Indiana, Joseph A. Samreta, Deputy Attorney General, Indianapolis, IN, Attorneys for Appellee.

OPINION
MATHIAS, Judge.
Darrin W. Partlow ("Partlow") appeals the trial court's summary disposition judgment against him and in favor of the Superintendent of the Miami Correctional Facility ("Superintendent"). His pro se, handwritten brief raises two issues on appeal, which we restate as:
I. Whether the trial court erred when it redesignated Partlow's Petition for a Writ of Habeas Corpus as a Petition for Post-Conviction Relief; and
II. Whether the trial court erred when it denied Partlow credit time for a second bachelor's degree.
We reverse and remand with instructions.

Facts and Procedural History
The facts most favorable to the trial court's judgment reveal that Partlow has been serving a sentence of forty-four years imposed by the Montgomery Circuit Court in 1981.[1] He is currently being held at the Miami Correctional Facility. While incarcerated, Partlow received an Associate in Arts Degree from Ball State University in May 1995, and one year was subtracted from Partlow's period of imprisonment. Then in December 1995, Partlow received a Bachelor of General Studies Degree from Indiana University, and two years were subtracted from Partlow's period of imprisonment. At that point, Partlow's revised release date became September 9, 2001.[2] In June 2000, Partlow received a second Bachelor of General Studies Degree, with minors in criminal justice and criminology, and psychology of human development from Ball State University. However, in November 2000, the Classification Division of the Department of Correction denied Partlow credit for his second Bachelor's Degree because "[i]n order to get credit for a second degree, it must be in a different area of study." Appellant's App. p. 13. If Partlow had been granted credit for the second Bachelor's Degree, his release date would have been revised to September 9, 2000.
*980 On January 11, 2001, Partlow filed a Petition for a Writ of Habeas Corpus with the Miami Circuit Court, the court in the county in which he was incarcerated. Partlow amended the petition on January 18. The Superintendent responded with a Motion to Dismiss or for Summary Disposition on February 23, which the trial court granted on February 26. Both the Superintendent and the trial court handled Partlow's petition as one for post-conviction relief, rather than a writ of habeas corpus. Partlow appeals the trial court's summary disposition.

I. Petition for Writ of Habeas Corpus
Partlow contends that the trial court erred when it redesignated his Petition for Writ of Habeas Corpus as a Petition for Post-Conviction Relief. We agree.
Habeas corpus practice is a well-established but little-used remedy under Indiana state law. The vast majority of criminal appeals take the form of either direct appeals or petitions for post-conviction relief, for which practice and procedure are well-settled.
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 habeas 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 1(1)(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).
Additionally, our supreme court has found that a trial court does not have "jurisdiction to entertain a petition for a writ of habeas corpus inasmuch as petitioner [is] serving time under a proper commitment, his sentence [has] not expired and he [has] not been denied good time or credit time ... [and h]e is not seeking a correction of the beginning or the end of his sentence." Young, 274 Ind. at 61, 408 N.E.2d at 1254 (citation omitted). Therefore, a petitioner must file a petition for post-conviction relief in the court of conviction (rather than a petition for a writ of habeas corpus in the court in the county of incarceration) when he attacks the validity of his conviction or sentence and/or does not allege that he is entitled to immediate discharge. See Ind. Post-Conviction Rule 1. Nevertheless, if a petitioner erroneously captions his action as petition for a writ of habeas corpus rather than post-conviction relief, courts will frequently and properly treat the petition as one for post-conviction relief, based on the content of the petition, rather than the caption. See Hawkins, 268 Ind. at 140, 374 N.E.2d at 498. Such a redesignation took place in our case and is the first complaint Partlow raises in his appeal.
*981 In Hinkle v. Dowd, 223 Ind. 91, 58 N.E.2d 342 (1944), Hinkle had filed a petition for a writ of habeas corpus in the trial court in the county where he was incarcerated. Hinkle argued that he had satisfied his judgment of conviction because he had earned good time credit that reduced his sentence. The Indiana Supreme Court held that the trial court in the county of incarceration properly decided Hinkle's case as a petition for a writ of habeas corpus because it was not an attack on the validity of the conviction court's judgment. Rather, Hinkle "recognized the validity of the judgment but insisted that he had served the term imposed thereby." Id. at 92, 58 N.E.2d at 342.
Partlow's argument in our case is almost exactly the same as the petitioner in Hinkle. Partlow is not attacking the validity of his conviction or sentence imposed by the Montgomery Circuit Court in 1981; rather, he asserts that he should have been given credit against his release date for earning a second bachelor's degree. If Partlow had received credit for his second bachelor's degree, he would have been released on September 9, 2000. Because Partlow argues that he is being unlawfully restrained past the expiration of his sentence and therefore deserves immediate discharge, Partlow correctly filed this action as a petition for writ of habeas corpus and the trial court erred when it treated his petition as one for post-conviction relief.
Nevertheless, the Miami Circuit Court had jurisdiction over Partlow's petition. Jurisdiction over writs of habeas corpus is traditionally with the court in the county where the petitioner is incarcerated, Ind.Code § 34-25.5-2-2 (1998), whereas petitions for post-conviction relief must be filed in the conviction court, Ind. Post-Conviction Rule 1(2). However, when a petitioner files what is captioned a petition for writ of habeas corpus with the court in the county of incarceration but the trial court deems it to be a post-conviction relief petition and the petitioner is attacking the validity of the conviction, the court where it was filed must transfer the petition to the conviction court. Ind. Post-Conviction Rule 1(1)(c). But, if the petitioner erroneously files a writ of habeas corpus that should be a post-conviction relief petition because it does not allege that the petitioner's remedy is immediate discharge (and it does not attack the validity of the conviction), such a petition may remain in the court in the county of incarceration. See Hawkins, 268 Ind. at 139-40, 374 N.E.2d at 498.
Therefore, even though the trial court erroneously redesignated Partlow's petition for a writ of habeas corpus as one for post-conviction relief, that court had jurisdiction to hear the case because the Miami Circuit Court 1) is in the county of incarceration; 2) Partlow is challenging the lawfulness of the Department of Correction's decision to not grant credit for his second bachelor's degree, and; 3) Partlow is arguing that he is entitled to immediate discharge.
The trial court summarily disposed of Partlow's petition without a hearing pursuant to Indiana Post-Conviction Relief Rules 1(4)(f) and 1(4)(g), which provide in pertinent part:
(f) ... If the pleadings conclusively show that petitioner is entitled to no relief, the court may deny the petition without further proceedings.
(g) The court may grant a motion by either party for summary disposition of the petition when it appears from the pleadings, depositions, answers to interrogatories, admissions, stipulations of fact, and any affidavits submitted, that there is no genuine issue of material fact and the moving party is entitled to judgment as a matter of law. The court may *982 ask for oral argument on the legal issue raised. If an issue of material fact is raised, then the court shall hold an evidentiary hearing as soon as reasonably possible.
P-C. R. 1(4)(f) and 1(4)(g). Because the trial court deemed Partlow's petition to be for post-conviction relief, the Superintendent merely responded to Partlow's petition with a motion to dismiss or summary disposition, which the trial court granted. We need not reach the issue of whether Partlow was entitled to a hearing on his properly-denominated petition for writ of habeas corpus because Partlow requests that we decide the merits of this case, which we turn to now.

II. Credit Time
Partlow argues that he should have received credit time for his second bachelor's degree granted by Ball State University in June 2000. The Classification Division of the Department of Correction denied his request for credit time for this degree because it found that "[i]n order to get credit for a second degree, it must be in a different area of study." Appellant's App. p. 13. Indiana Code section 35-50-6-3.3(d) sets forth the amount of credit time prisoners may be awarded for earning degrees during incarceration. It states:
(d) The amount of credit time a person may earn under this section is the following:
(1) Six (6) months for completion of a state of Indiana general educational development (GED) diploma under IC 20-10.1-12.1.
(2) One (1) year for graduation from high school.
(3) One (1) year for completion of an associate's degree.
(4) Two (2) years for completion of a bachelor's degree.
....
(i) The maximum amount of credit time a person may earn under this section is the lesser of:
(1) four (4) years; or
(2) one-third (1/3) of the person's total applicable credit time.
Ind.Code § 35-50-6-3.3 (Supp.1999). The statute does not explicitly restrict or prohibit prisoners from attaining more than one degree at the same level and it does not specifically set forth areas of study prisoners may or may not concentrate on in their education. While the statute limits the amount of credit time a prisoner may earn while attaining degrees to the lesser of four years or one-third of a prisoner's total applicable credit time, it does not specifically restrict combinations of degrees that may be earned to reach the maximum credit of four years.
The trial court relied solely on the rationale of Moshenek v. Anderson, 718 N.E.2d 811 (Ind.Ct.App.1999), to deny Partlow credit for his second bachelor's degree.[3] In Moshenek, an appeal from a trial court's summary denial of a petition for a writ of habeas corpus, Moshenek had earned two associate's degrees, each from different areas of study and different universities. The Department of Correction denied Moshenek credit for his second associate's degree stating that the Department only grants education credit for degrees at different levels. Id. at 812. This court, however, reversed the trial court and held that pursuant to rules of statutory *983 construction used to interpret ambiguous statutes, the purpose of the statute is "to provide incentive to further one's education while incarcerated." Id. at 813 (quoting Miller v. Bryant, 644 N.E.2d 188, 191 (Ind.Ct.App.1994)). In Moshenek, this court went on to find that pursuing two degrees in different areas of concentration, whether or not they are at the same educational level, supports the statutory purpose of furthering one's education. Id. at 813-14. Therefore, the court found that Moshenek was entitled to credit for both of his associate's degrees because although at the same educational level, they were in different areas of concentration. Id. In the end, the Moshenek court found: "If the legislature prefers to prohibit a person from receiving credit for multiple degrees of the same educational level, then it is free to do so by amending the statute." Id. at 814.
Our case is very similar to Moshenek because Partlow has been denied credit for a second bachelor's degree based on the fact that both of his bachelor's degrees are in the area of general studies. In denying Partlow credit for his second bachelor's degree, the trial court relied on the Moshenek court's statement: "When a person pursues two college degrees in different areas of concentration, he is furthering his education, even if those degrees are of the same educational level." Id. at 813-14. The Moshenek court's actual holding was far more limited, however: "When reading the statute to comport with the legislature's intent of furthering one's education, we hold that the statute does not preclude a person from using multiple degrees of the same educational level to comprise his total credit time." Id. at 814.
We agree with the Moshenek court's discernment that the intent of the General Assembly in Indiana Code section 35-50-6-3.3 was to provide incentive to further one's education while incarcerated. This is also laudable public policy. Like the Moshenek court, we also believe that it is the role of the General Assembly to consider and enact any further limitations on educational credit one may earn while incarcerated.

Conclusion
Because we find that the trial court erred when it denied Partlow credit for his second bachelor's degree, we reverse and remand this case with instructions to the trial court to award Partlow one year of credit from his term of incarceration for his second bachelor's degree, consistent with Indiana Code section 35-50-6-3.3. We realize that this reduction may result in Mr. Partlow's immediate release.
Reversed and remanded with instructions.
DARDEN, J., and VAIDIK, J., concur.
NOTES
[1]  In July 1981, Partlow was convicted of Murder and Robbery and was sentenced to forty (40) years imprisonment for murder and thirty (30) years imprisonment for robbery, to be served consecutively. Partlow v. State, 453 N.E.2d 259, 263 (Ind.1983). Although the details are unclear in the record, we note that in June 1996, Partlow's sentence for the robbery was reduced from thirty (30) to four (4) years imprisonment.
[2]  This date is arrived at by taking into account both sentences, all education credit time earned, and all good time credit earned and added back into his sentence pursuant to Indiana Code section 35-50-6-3.
[3]  Another issue in Moshenek was whether the petitioner erroneously filed a petition for writ of habeas corpus, when he should have filed a petition for post-conviction relief. This court found that the petition was erroneously captioned and should have been filed as a petition for post-conviction relief because the petitioner was not claiming that he was entitled to immediate discharge. Moshenek, 718 N.E.2d at 812.
