
231 S.W.3d 725 (2006)
Russell McKINNON, Appellant,
v.
Larry NORRIS, Director, Arkansas Department of Correction, Appellee.
No. 05-756.
Supreme Court of Arkansas.
March 9, 2006.
Opinion Published May 18, 2006.
*727 Russell McKinnon, pro se, for appellant.
Mike Beebe, Att'y Gen., by: Scott P. Richardson, Ass't Att'y Gen., for appellee.
PER CURIAM.
Russell McKinnon was convicted of rape of an eleven year old and was sentenced as an habitual offender to forty years' imprisonment. We affirmed. McKinnon v. State, 287 Ark. 1, 695 S.W.2d 826 (1985). After the judgment of conviction was affirmed, McKinnon sought leave from this court to proceed in the trial court with a petition for postconviction relief pursuant to Criminal Procedure Rule 37.1.[1] We *728 denied the petition. McKinnon v. State, CR 85-81, 1986 WL 9967 (Ark. Sept. 15, 1986) (per curiam).
McKinnon, an inmate at the Arkansas Department of Correction ("ADC"), received a "disciplinary" for violation of a behavior rule. As a result of receiving the disciplinary, McKinnon claimed that he was transferred to a higher security unit, assigned to administrative segregation, placed in administrative punitive segregation for thirty days, reduced in his inmate class status, and forced to forfeit good-time credit. The disciplinary action was upheld at a hearing conducted at the unit where McKinnon was housed. McKinnon then appealed the disciplinary action to the warden of his unit, and then to Larry Norris, Director of the Arkansas Department of Correction, who also affirmed the decision.
Subsequently, McKinnon filed a petition for writ of habeas corpus and a petition for declaratory judgment in the Circuit Court of Lincoln County pertaining to the disciplinary action. The State filed a motion to dismiss both the petition for writ of habeas corpus and petition for declaratory judgment. The trial court denied the petition for writ of habeas corpus in a preliminary order filed December 16, 2004. Therein, the trial court found that the thirty-day punitive restriction had already been served, and thus the petition was moot.
The trial court held a hearing on McKinnon's declaratory judgment complaint. The trial court granted the State's motion to dismiss the declaratory relief complaint in an order filed on February 2, 2005, finding a lack of justiciable controversy as required to maintain an action for declaratory judgment. Appellant McKinnon, proceeding pro se, has lodged a timely appeal in this court from that order. We find no error and affirm the trial court's decision.
On appeal, appellant argues four points for reversal: (1) the trial court erred when it denied appellant's petition for writ of habeas corpus; (2) the trial court erred when it denied appellant's petition for declaratory judgment; (3) the trial court erred when it denied appellant's petition for declaratory judgment without making findings of fact and conclusions of law; (4) the trial court erred when it overruled appellant's objection to testimony by a witness regarding alleged past bad acts of appellant.
We do not reverse a denial of postconviction relief unless the trial court's findings are clearly erroneous or clearly against the preponderance of the evidence. Greene v. State, 356 Ark. 59, 64, 146 S.W.3d 871, 876 (2004). A finding is clearly erroneous when, although there is evidence to support it, the appellate court after reviewing the entire evidence is left with the definite and firm conviction that a mistake has been committed. Flores v. State, 350 Ark. 198, 85 S.W.3d 896 (2002).
In his first point on appeal, appellant argues that the trial court erred in denying his petition for writ of habeas corpus. Appellant claims that seeking a habeas writ was proper because the disciplinary action he received extended the total period of his incarceration.[2] Without a reduction of appellant's sentence based *729 on the ability to earn good-time credit, appellant claims he is subject to an "unlawful confinement" due to the extension of the time he will be incarcerated.
A writ of habeas corpus will issue only if the commitment was invalid on its face or where the sentencing court lacked subject-matter jurisdiction to enter or modify the sentence. Taylor v. State, 354 Ark. 450, 125 S.W.3d 174 (2003); Sawyer v. State, 327 Ark. 421, 938 S.W.2d 843 (1997) (per curiam).
Appellant here does not challenge the original sentence he received as being invalid or claim that the original trial court lacked subject-matter jurisdiction when appellant received his sentence of forty years' incarceration. Further, appellant does not appear to challenge the thirty-day confinement he received as a result of the disciplinary action. Rather, appellant claims a right of entitlement to receive statutory good-time credit to reduce the sentence to be served. Appellant reasons that by his being deprived of that right as a result of receiving the disciplinary action, he is being unlawfully confined and the time on his current sentence is being lengthened.
In his argument to this court, appellant cites Ark.Code Ann. § 16-90-121 (1987) and an unpublished per curiam opinion of this court as the basis for his claim. In response, the State argues that pursuant to Ark.Code Ann. § 12-29-201 (Repl.1995), meritorious good time will not reduce the length of appellant's sentence, but only affect his transfer eligibility date.
Section 16-90-121 provides:
Any person who pleads guilty or nolo contendere to, or is found guilty of, a second or subsequent felony involving the use of a firearm shall be sentenced to a minimum term of imprisonment of ten (10) years in the state prison without eligibility of parole or community punishment transfer but subject to reduction by meritorious good-time credit.
Appellant's reliance on this statute is misplaced for two reasons. First, appellant was sentenced for rape, not for committing a second felony involving the use of a firearm. Thus, the statute is inapplicable to appellant's factual situation. Second, this statute does not nullify Ark.Code Ann. § 12-29-201(d), which plainly states that "[m]eritorious good time will not be applied to reduce the length of a sentence." Instead, the statute relied upon by appellant actually supports the application of meritorious good time to an inmate's transfer eligibility date as explained in Ark.Code Ann. § 12-29-201(e)(1).
Additionally, appellant's original petition for writ of habeas corpus claimed a "state[-]created right and liberty interest in expecting officials to obey and follow A.D.C. rules, policies and procedure [and] the complained[-]of denial of due process has risen to cruel and unusual punishment when intentionally done and knowingly depriving petitioner of liberty by extending incarceration."[3] While appellant did not couch his argument on appeal in terms of a *730 specific constitutional issue, appellant's argument nonetheless contemplates a constitutional claim of an improper taking of a liberty interest without substantive due process. However, meritorious good time does not apply to reduce the length of a sentence as noted above. As a result, Arkansas has not created a liberty interest in good time under the constitutional analysis in Wolff v. McDonnell, 418 U.S. 539, 94 S.Ct. 2963, 41 L.Ed.2d 935 (1974), cited by both parties.[4] Thus, an implied claim for a substantive due process violation cannot be supported.
A petition for writ of habeas corpus is not the proper method with which to claim a statutory violation or to challenge the constitutionality of a purported taking. Pursuant to the stated purpose of a petition for writ of habeas corpus, appellant has failed to allege or show that the original commitment was invalid on its face or that the original sentencing court lacked subject-matter jurisdiction to enter or modify the sentence. We find that the trial court's denial of the petition for writ of habeas corpus was not clearly erroneous and affirm.
We next turn to appellant's second point on appeal. Appellant posits that the trial court erred when it denied appellant's complaint for declaratory judgment. In his brief to this court, appellant states, "Appellant's request for Declaratory Judgment was based solely on the fact that [ADC] procedures were not complied with, and as a result of their non-compliance Appellant was denied Fundamental Due Process."
With regard to actions for declaratory judgment, in Martin v. Equitable Life Assurance Society, 344 Ark. 177, 40 S.W.3d 733 (2001), we stated:
A declaratory judgment declares rights, status, and other legal relationships whether or not further relief is or could be claimed. The proceeding is intended to supplement rather than supercede ordinary causes of action. Declaratory-judgment procedure is not a proper means of trying a case. A declaratory-relief action is not a substitute for an ordinary cause of action. Rather it is dependent on and not available in the absence of a justiciable controversy.
344 Ark. at 181, 40 S.W.3d at 736 (citations omitted). Typically, declaratory relief will be utilized to determine the construction and validity of a "deed, will, written contract, or other writings" when the respective rights and status of parties are affected. Ark.Code Ann. § 16-111-104 (1987).
In the instant case, while incarcerated at the Diagnostic Unit, appellant submitted a urine sample at the instruction of a prison officer. The results of testing appellant's urine sample indicated that the sample had been diluted. Appellant was written up for violating behavior rule 02-16, "[r]efusal to submit to substance abuse testing for determination of violation of Rule 02-2." Behavior rule 02-2 lists individual disruptive behavior to include being "[u]nder the influence of an/or any use of illegal drugs, alcohol, intoxicating chemicals or any medication *731 in an un authorized manner." Appellant received a hearing on the matter after being transferred to the Cummins Unit. The hearing officer upheld the violation. Appellant filed an appeal with the warden, who affirmed the decision. Appellant also appealed to the Director, appellee herein, who likewise affirmed the decision.
After filing his complaint for declaratory judgment in the circuit court, the trial court held a hearing on the matter. At the hearing, appellant testified that the diluted urine sample was the result of his excessive water intake. The ADC hearing officer administrator countered that appellant provided water to be tested instead of a urine sample. Next, appellant argued that he should not have been charged with violating Rule 02-16 since he did not refuse to provide a urine sample. Rather, based on ADC's claim that he provided water instead of urine, appellant maintained that he should have been charged with violating Rule 08-1, 08-2 or 08-3, for attempting to adulterate a urine specimen.
Appellant also alleged that ADC improperly charged him with the disciplinary violation, which he claims is evidenced by the date and time of various forms. Finally, he claimed that on appeal to the warden, the warden upheld the findings of the hearing court based on completely different charges.
The trial court in the instant matter granted the State's motion to dismiss. At the hearing, testimony was taken and documents were introduced into evidence. A motion to dismiss is converted to a motion for summary judgment when matters outside of the pleadings are presented to and not excluded by the court. Nielsen v. Berger-Nielsen, 347 Ark. 996, 69 S.W.3d 414 (2002). Summary judgment is granted when there are no genuine issues of material fact, and the moving party is entitled to judgment as a matter of law. Id. at 1003, 69 S.W.3d at 418. We view the evidence in the light most favorable to the party against whom the motion was filed, resolving all doubts and inferences against the moving party. Id. at 1004, 69 S.W.3d at 418. Our review focuses on the documents filed by the parties and testimony taken at the hearing, as well as the pleadings. Thus, our standard of review in this case is a summary-judgment review.
If we view the evidence in the light most favorable to appellant and resolve all doubts and inferences against the State as the moving party, we cannot hold that appellant was entitled to judgment as a matter of law. Appellant claims that he seeks a declaratory judgment stating that ADC officials failed to follow their own procedures and subjected appellant to a disciplinary action under the wrong section of the inmate discipline manual, thereby violating his right to due process. However, the result appellant desires is to overturn the decision by ADC and the penalties he received thereunder based on perceived irregularities and errors, which is tantamount to an appeal. Indeed, in his argument to this court, appellant maintains that the disciplinary action in this matter should be reversed. That is not the proper function of a declaratory judgment.
Our declaratory judgment act "was not intended to allow any question to be presented by any person; the matters must first be justiciable." Andres v. First Ark. Development Finance Corp., 230 Ark. 594, 606, 324 S.W.2d 97, 104 (1959) (emphasis in original). The declared legislative purpose of a declaratory judgment is "to settle and to afford relief from uncertainty and insecurity with respect to rights, status, and other legal relations." Ark.Code Ann. § 16-111-102(b) (1987). Here, the legal rights as between appellant *732 and ADC have already been established in that appellant is an inmate who is subject to the rules and regulations promulgated by ADC.[5]
We will uphold the trial court's decision unless it is clearly erroneous. The trial court in this matter found a lack of justiciable issue as the basis for granting the State's motion to dismiss appellant's complaint for declaratory judgment.[6] Therefore, the trial court's decision was not clearly erroneous and we affirm.
Appellant next claims that the trial court erred in denying his complaint for declaratory judgment without making findings of fact and conclusions of law. The State argues that under Ark. R.Crim. P. 37.3, a petition for postconviction relief requires such findings of fact and conclusions of law; however, actions for declaratory judgment do not. The unpublished per curiam decision of this court cited by appellant in support of his argument involves a Rule 37.1 petition for postconviction relief. We find no error in the order filed by the trial court and affirm.
For his last point on appeal, appellant argues that the trial court erred when it overruled appellant's objection to testimony by a witness regarding alleged past bad acts of appellant. As the testimony presented by James Gibson had no relevance to our finding of a lack of justiciable issue, appellant has not shown how he was prejudiced by the witness's testimony. We hold that the trial court did not err by overruling appellant's objection to the testimony and affirm.
Affirmed.
NOTES
[1]  Prior to July 1, 1989, a petitioner whose judgment of conviction had been affirmed on appeal was required to petition this court for relief under Criminal Procedure Rule 37.1 and gain leave from this court to proceed under the rule in the circuit court before filing a petition there. The rule was revised effective January 1, 1991, to allow petitioners convicted after that date to file for postconviction relief directly in the trial court without having first garnered permission from this court. In re Reinstatement of Rule 37 of the Arkansas Rules of Criminal Procedure, 303 Ark. 746, 797 S.W.2d 459 (1990) (per curiam).
[2]  Appellant argues that he would not be eligible to gain credit for meritorious good time, thus an earlier release date, as his inmate status had been reduced from class I to class IV.
[3]  We note that although appellant abstracted the original petition, and the petition is contained in the record, appellant did not include the original petition in the addendum. We will, however, not require appellant to file a substituted addendum to cure the deficiency in conformance with Ark. Sup.Ct. R. 4-2(b), as it is clear on the record before us that appellant could not prevail. See Pardue v. State, 338 Ark. 606, 999 S.W.2d 198 (1999) (per curiam); Seaton v. State, 324 Ark. 236, 920 S.W.2d 13 (1996) (per curiam); Harris v. State, 318 Ark. 599, 887 S.W.2d 514 (1994) (per curiam); Reed v. State, 317 Ark. 286, 878 S.W.2d 376 (1994) (per curiam).
[4]  In Wolff, prisoners in Nebraska filed a civil rights action seeking damages and injunctive relief based, in part, on allegations that the disciplinary proceedings violated due process. Considering the disciplinary procedures in place in Nebraska prisons, the United States Supreme Court upheld the procedures that were in effect. The Court noted that prison disciplinary proceedings, which must be governed by the twin considerations of institutional needs and generally applicable constitutional requirements, should implicate only minimal due process rights rather than the full spectrum of due process rights. The Court also upheld Nebraska's right to strip prisoners of their good-time credit for serious infractions so long as minimal due process rights were protected.
[5]  We have recognized that administrative agencies, due to their specialization, experience, and greater flexibility of procedure, are better equipped than courts to analyze legal issues dealing with their agencies. First Nat'l Bank v. Arkansas State Bank Comm'r, 301 Ark. 1, 781 S.W.2d 744 (1989). This accounts for the limited scope of review of administrative action and the reluctance of a court to substitute its judgment for that of the agency. Id. In particular, the administration of prisons has generally been held to be beyond the province of the courts. Stevens v. State, 262 Ark. 216, 555 S.W.2d 229 (1977); Walker v. Lockhart, 713 F.2d 1378 (8th Cir.1983). Therefore, we have consistently declined to dictate the operation of the Arkansas Department of Correction. Martin v. State, 340 Ark. 719, 13 S.W.3d 576 (2000) (per curiam).
[6]  The four prerequisites for granting declaratory relief are: (1) there must exist a justiciable controversy in which a claim or right is asserted against one who has an interest in contesting it; (2) the controversy must be between persons whose interests are adverse; (3) the party seeking relief must have a legally protectable interest in the controversy; (4) the issue involved in the controversy must be ripe for judicial determination. Arkansas Dep't of Human Servs. v. Ross-Lawhon, 290 Ark. 578, 579, 721 S.W.2d 658, 658 (1986).

On appeal, the question as to whether there was a complete absence of a justiciable issue shall be reviewed de novo on the record of the trial court. Jegley v. Picado, 349 Ark. 600, 611, 80 S.W.3d 332, 336 (2002).
