               IN THE COURT OF APPEALS OF THE STATE OF IDAHO

                                        Docket No. 39133

IN THE MATTER OF THE APPLICATION )
FOR HABEAS CORPUS.               )
DOUGLAS WILLIAM FRIEDMAN,        )                      2012 Unpublished Opinion No. 311
                                 )
     Petitioner-Appellant,       )                      Filed: January 6, 2012
                                 )
v.                               )                      Stephen W. Kenyon, Clerk
                                 )
PAM SONNEN, SOUTH IDAHO          )                      THIS IS AN UNPUBLISHED
CORRECTIONAL INSTITUTION, IDAHO )                       OPINION AND SHALL NOT
DEPARTMENT OF CORRECTION,        )                      BE CITED AS AUTHORITY
                                 )
     Respondent.                 )
                                 )

       Appeal from the District Court of the Fourth Judicial District, State of Idaho, Ada
       County. Hon. Daniel C. Hurlbutt, District Judge.

       Order dismissing petition for writ of habeas corpus, affirmed.

       Douglas William Friedman, Boise, pro se appellant.

       Hon. Lawrence G. Wasden, Attorney General, Boise, respondent, did not
       participate on appeal.
                   ________________________________________________
MELANSON, Judge
       Douglas William Friedman appeals from the summary dismissal of his petition for writ of
habeas corpus relief. For the reasons set forth below, we affirm.
       The writ of habeas corpus is a constitutionally mandated mechanism to effect the
discharge of an individual from unlawful confinement. See IDAHO CONST. art. I, § 5; I.C. §§ 19-
4201 to 19-4229; Mahaffey v. State, 87 Idaho 228, 231, 392 P.2d 279, 280 (1964); Gawron v.
Roberts, 113 Idaho 330, 333, 743 P.2d 983, 986 (Ct. App. 1987). The essence of habeas corpus
is an attack upon the legality of a person’s detention for the purpose of securing release where
custody is illegal and is an avenue by which relief can be sought where detention of an individual
is in violation of a fundamental right. In re Robison, 107 Idaho 1055, 1057, 695 P.2d 440, 442
(Ct. App. 1985). An in-state prisoner may file a petition for writ of habeas corpus to request that



                                                1
a court inquire into state or federal constitutional questions concerning conditions of
confinement, the revocation of parole, miscalculation of a sentence, loss of good time credits, or
detainers lodged against the prisoner. I.C. §§ 19-4203(2)(a)-(e). Habeas corpus should not be
used as a substitute for, or in addition to, a direct appeal of a criminal conviction or proceeding
under Idaho Criminal Rule 35 or the Uniform Post-Conviction Procedures Act. I.C. § 19-
4203(4).
       The decision to issue a writ of habeas corpus is a matter within the discretion of the court.
Johnson v. State, 85 Idaho 123, 127, 376 P.2d 704, 706 (1962); Brennan v. State, 122 Idaho 911,
914, 841 P.2d 441, 444 (Ct. App. 1992). When we review an exercise of discretion in a habeas
corpus proceeding, we conduct a three-tiered inquiry to determine whether the lower court
rightly perceived the issue as one of discretion, acted within the boundaries of such discretion,
and reached its decision by an exercise of reason. Brennan, 122 Idaho at 914, 841 P.2d at 444;
Sivak v. Ada County, 115 Idaho 762, 763, 769 P.2d 1134, 1135 (Ct. App. 1989). If a petitioner is
not entitled to relief on an application for a writ of habeas corpus, the decision by the petitioned
court to dismiss the application without an evidentiary hearing will be upheld. Brennan, 122
Idaho at 917, 841 P.2d at 447. When a court considers matters outside the pleadings on an
I.R.C.P. 12(b)(6) motion to dismiss, such motion must be treated as a motion for summary
judgment. Hellickson v. Jenkins, 118 Idaho 273, 276, 796 P.2d 150, 153 (Ct. App. 1990).
       Friedman argues that he was improperly convicted because he was never indicted by a
grand jury. Friedman does not demonstrate how not being indicted by a grand jury affects the
conditions of his confinement, revocation of his parole, miscalculation of his sentence, loss of
good time credits, or a detainer lodged against him. See I.C. §§ 19-4203(2)(a)-(e). Friedman
cannot use a habeas proceeding to challenge the validity of his conviction or his sentence.
Therefore, we hold the district court did not abuse its discretion in summarily dismissing
Friedman’s petition.
       Judge LANSING and Judge GUTIERREZ, CONCUR.




                                                 2
