
332 N.W.2d 232 (1983)
STATE of North Dakota, Plaintiff and Appellee,
v.
Patrick T. McMORROW, Jr., Defendant and Appellant.
Cr. No. 893.
Supreme Court of North Dakota.
March 30, 1983.
*233 Edwin Zuern, Asst. Atty. Gen., Bismarck, and Bruce D. Quick, Asst. State's Atty., Fargo, for plaintiff and appellee; argued by Edwin Zuern, Asst. Atty. Gen., Bismarck.
Patrick T. McMorrow, Jr., pro se.
PEDERSON, Justice.
Patrick T. McMorrow, Jr. appeals from the district court's denial of his application for post-conviction relief and accompanying motions. We affirm.

I. FACTS
McMorrow was tried for the crime of arson, found guilty, and confined in the state penitentiary. He applied to the district court for relief pursuant to Chapter 29-32, NDCC, the Uniform Post-Conviction Procedure Act. Any person who has been convicted of or sentenced for a crime may institute a proceeding under the Act to secure relief if he claims:
"a. That the conviction or the sentence was in violation of the constitution, laws, or treaties of the United States or the constitution or laws of this state;
b. That the court was without jurisdiction to impose sentence;
c. That the sentence exceeds the maximum authorized by law;
d. That there exists evidence of material facts, not previously presented and heard, that requires vacation of the conviction or sentence in the interest of justice;
e. That his sentence has expired, that his probation, parole, or conditional release has been unlawfully revoked, or that he is otherwise unlawfully held in custody or other restraint; or
f. That the conviction or sentence is otherwise subject to collateral attack upon any ground of alleged error heretofore available under any common law, statutory or other writ, motion, petition, proceeding, or remedy. . . ."
Section 29-32-01, NDCC.
McMorrow alleged in his petition that he was held before trial because bail was excessive; that during his pretrial confinement he was harassed by jail personnel and denied privileges, reasonable medical treatment, and religious freedom; that his right to due process of law was violated by an erroneous presentence report; that he has suffered personal hardship since his incarceration; that he was denied his First Amendment right to worship during incarceration; that he has suffered cruel and unusual punishment because penitentiary officials denied him medical treatment; that he was denied due process during prison hearings; that the parole board denied him due process of law; and that he requested and was refused a transcript of his trial. In addition, McMorrow specifically requested a hearing and appointment of an attorney.
The district court considered McMorrow's application and determined there was no material issue of fact. The court also determined that the alleged due process violation by the parole board and the personal hardships allegedly not considered by the sentencing court were not the types of claims that the district court could consider under the Post-Conviction Procedure Act. The court considered McMorrow's allegations of violations of the First, Fourth, Fifth, Eighth, and Fourteenth Amendments to the United States Constitution based upon prison conditions, a presentence report, excessive bail, court documents, and presentence trial confinement. Although the court believed the Act allowed it to consider all substantial issues raised, the court did not believe any substantial issue *234 had been raised by McMorrow. The court found that McMorrow's counsel during his initial trial and appeal had been provided transcripts of all proceedings. The court concluded a hearing and appointment of counsel were not necessary. McMorrow's petition and motions were denied.

II. UNIFORM ACT
The original Uniform Post-Conviction Procedure Act was approved in 1955 and was adopted in Maryland, Montana, and Oregon. The revised Uniform Post-Conviction Procedure Act was approved in 1966 and was adopted in Idaho, Iowa, Minnesota, Nevada, North Dakota, Oklahoma, South Carolina, and South Dakota. Uniform laws adopted in North Dakota are to be interpreted to effectuate their general purpose. Section 1-02-13, NDCC. The Uniform Post-Conviction Procedure Act provides a remedy for all grounds for attacking the validity of a conviction or sentence in a criminal case. See Commissioners' Prefatory Note to the 1966 Revised Uniform Post-Conviction Procedure Act.
McMorrow prepared his petition without the aid of counsel; however his petition is intelligible. This court considers an appeal from a denial of an application for post-conviction relief by reviewing "the record as it was presented to the trial court to determine whether a material issue of fact existed, inasmuch as the trial court, in effect, granted a summary judgment of dismissal of the petitioner's application." State v. Lueder, 252 N.W.2d 861, 866 (N.D. 1977). After reviewing the record in the instant case we conclude that the trial court correctly found that McMorrow's claims were either not proper under the Act or they did not raise substantial issues which could be considered.[1]

III. APPOINTMENT OF COUNSEL
In his appellate brief McMorrow emphasized his belief that the district court erred by not appointing him an attorney pursuant to § 29-32-05, NDCC. This section provides:

"If the applicant is unable to pay court costs and expenses of representation, including stenographic, printing, and legal services, these costs and expenses, except in cases of misdemeanors and infractions exempted under the federal supreme court decisions and violations of municipal ordinances, shall be made available to the applicant in the preparation of the application, in the trial court, and on review. Costs and expenses made available to the applicant shall, upon approval by the judge, be paid by the state where the application was made to a district court, or by the county in which the criminal action was venued, where the application was made to a county court."
Section 29-32-05, NDCC (emphasis added).[2]*235 McMorrow asks this court to remand to the district court ordering the appointment of counsel.
As the trial court determined, McMorrow's claims are either not appropriate under the Post-Conviction Procedure Act or they are without merit. However, McMorrow does raise the important issue of whether or not § 29-32-05, NDCC, requires that an indigent prisoner is entitled to court-appointed counsel for assistance in filling out his application for post-conviction relief and for assistance during any hearings and an appeal.
Only Idaho, Iowa, and South Carolina's post-conviction procedure acts contain sections concerning the prisoner's inability to pay costs which are similar to § 29-32-05, NDCC and § 5 of the Revised Uniform Act, and only Iowa courts have considered the section. According to the Commissioners' Prefatory Note, the Revised Uniform Act of 1966 "provides that the expenses of representation including legal services should be provided to applicants who are unrepresented and without funds to pay for their own lawyers even to the extent of legal aid in preparation of the application." In 1980 a new Uniform Post-Conviction Act was approved. Section 5(a) has been modified to state: "If an applicant requests appointment of counsel and the court is satisfied that the applicant is unable to obtain adequate representation, the court shall appoint counsel to represent the applicant."
Two ABA Criminal Justice Standards that discuss the appointment of counsel and post-conviction relief are cited in the Commissioners' Comment to § 5 of the 1980 version of the Post-Conviction Procedure Act. Standard 22-3.1(a) provides:
"Every state should establish a system whereby persons who may have grounds for postconviction relief, and who are unable to afford adequate legal counsel, are provided with the assistance necessary to evaluate the possible merit of contemplated claims for post-conviction relief and to prepare and file applications stating claims upon which such relief may be granted. . . ."
The commentary to ABA Criminal Justice Standard 22-3.1 states:
"Relatively long periods of idleness, an acute sense of grievance, and the hope that springs eternal in the human breast can combine to bring forth a host of applications from prisoners. In light of their own lack of legal sophistication, and the inevitable distortions in the minds of men and women evaluating their own cases, it is not surprising that a high percentage of the applications are groundless. The best way to prevent a flow of worthless applications and, conversely, to bring forward meritorious applications, is to educate the prisoner population on the respective utility and futility of applying. The optimal form of education is face-to-face interviews between prisoners and attorneys to discuss the probable merit or lack of merit of grievances."
The commentary to Standard 22-4.3 notes:
"It is waste of judicial resources and an inefficient method of treating the substantive merits of applications for postconviction relief to proceed without counsel for applicants. Exploration of the legal grounds for complaint, investigation *236 of the underlying facts, and more articulate statement of the claims are functions of an advocate; it is inappropriate for a judge, or for court staff, to undertake such work...."
In State v. Lueder, supra, 252 N.W.2d at 865-66, this court considered the North Dakota Act and held that the trial court should attempt to make post-conviction hearings meaningful by considering appointing counsel to represent an indigent prisoner unable to attend hearings because of his confinement.

A. FEDERAL LAW
In 1969 the United States Supreme Court considered a Tennessee prison regulation affecting "jailhouse lawyers," prisoners who assist other prisoners in legal matters. The Court noted that many states provide attorneys for prisoners through public defender programs, legal aid associations, senior law student programs, and volunteer programs sponsored by the local bar. Johnson v. Avery, 393 U.S. 483, 489, 494-95, 89 S.Ct. 747, 751, 753-54, 21 L.Ed.2d 718, 723-24, 726-27 (1969). The Johnson Court stated:
"In most federal courts, it is the practice to appoint counsel in post-conviction proceedings only after a petition for post-conviction relief passes initial judicial evaluation and the court has determined that issues are presented calling for an evidentiary hearing. . . .
"It has not been held that there is any general obligation of the courts, state or federal, to appoint counsel for prisoners who indicate, without more, that they wish to seek post-conviction relief ...." Johnson, supra, 393 U.S. at 487-88, 89 S.Ct. at 750, 21 L.Ed.2d at 722.
Under 28 U.S.C. § 2255, the federal post-conviction relief statute, federal courts have discretion in appointing counsel for applicants. See Sanders v. United States, 373 U.S. 1, 21, 83 S.Ct. 1068, 1080, 10 L.Ed.2d 148, 164 (1963). The Ninth Circuit Court of Appeals noted the existence of this discretion and discussed the standard to be applied in its use as follows:
"The standard to be applied by the trial court in the exercise of this discretion has not been clearly established. There is case authority indicating that counsel should be appointed in collateral attack proceedings whenever it appears probable that any substantial issue, or at least a substantial issue of fact, will be presented. . . .
"We need not go so far. For purposes of this case it is enough to agree with the recent suggestion of the Court of Appeals for the Second Circuit that `where a petition for the writ [of habeas corpus] presents a triable issue of fact the clear presentation of which requires an ability to organize factual data or to call witnesses and elicit testimony in a logical fashion it is much the better practice to assign counsel.'" Dillon v. United States, 307 F.2d 445, 447-48 (9th Cir. 1962). (footnotes omitted.)

B. IOWA LAW
The Iowa post-conviction relief act section on expenses is almost identical to § 29-32-05, NDCC. It provides: "If the applicant is unable to pay court costs and expenses of representation, including stenographic, printing, and legal services, these costs and expenses shall be made available to the applicant in the preparation of the application, in the trial court, and on review." Iowa Code Ann. § 663A.5.
In State v. Mulqueen, 188 N.W.2d 360, 362-63 (Iowa 1971), a case of first impression, the Iowa Supreme Court considered Iowa's codification of the Revised Uniform Post-Conviction Procedure Act. Because the Iowa Code requires that the Iowa Act be interpreted to effectuate its general purpose to make the law uniform, the Iowa court looked at decisions of federal courts, decisions of other state courts, and the commissioners' comments. In Mulqueen the court considered the issue of the "movant's right to appointed counsel in this postconviction relief proceeding." 188 N.W.2d at 363.
*237 The Mulqueen court noted that inartfully drawn petitions must be read liberally in favor of the applicant. 188 N.W.2d at 364. See Chartier v. State, 223 N.W.2d 255, 256 (Iowa 1974). The United States Supreme Court has stated that an "applicant for [post-conviction] relief ought not to be held to the niceties of lawyers' pleadings or be cursorily dismissed because his claim seems unlikely to prove meritorious." Sanders v. United States, 373 U.S. 1, 22, 83 S.Ct. 1068, 1080, 10 L.Ed.2d 148, 165 (1963).
The Iowa Supreme Court considered federal case law regarding appointing counsel in federal post-conviction relief cases and concluded that an attorney does not have to be appointed to represent every indigent for post-conviction relief. Mulqueen, supra, 188 N.W.2d at 366. The decision of whether or not to appoint counsel rests in the trial court's discretion. However, this discretion is very limited in Iowa. See Dodd v. State, 232 N.W.2d 472, 475 (Iowa 1975).
The Mulqueen court determined that trial courts should appoint attorneys for indigent post-conviction relief applicants when it would be beneficial to the applicant, conducive to a just disposition in the trial court, and helpful on appeal. 188 N.W.2d at 366. See Furgison v. State, 217 N.W.2d 613, 615 (Iowa 1974). In a later Iowa case the Iowa Supreme Court added that trial judges should read the application in a light most favorable to the applicant; if a substantial issue of law or fact may exist, then counsel should be appointed at once. Furgison, supra, 217 N.W.2d at 615-16. In a few cases an indigent applicant will be unable to file any application without assistance. In that instance the Iowa Supreme Court has determined that counsel should be appointed for the purpose of assisting the applicant in preparing his application for post-conviction relief. Hall v. State, 246 N.W.2d 276, 277 (Iowa 1976).

IV. CONCLUSION
It would be an ideal situation if every prisoner could have legal assistance in evaluating and filing his application. However, we believe the Iowa Supreme Court has reached a practical interpretation of the Revised Uniform Post-Conviction Procedure Act section on the appointment of counsel. We adopt the guidelines for trial courts stated in Mulqueen, Furgison, and Hall. The appointment of counsel is discretionary, but applications should be read in a light most favorable to the applicant. If a substantial issue of law or fact may exist, counsel should be appointed. Trial judges ordinarily would be well advised to appoint counsel for most indigent post-conviction review applicants. See Furgison, supra, 217 N.W.2d at 615.
In the instant case we are presented with the exceptional situation in which it was appropriate for the court not to appoint counsel for McMorrow. McMorrow was able to file an application without assistance. His application, read most favorably toward him, did not raise the possibility of a substantial issue of law or fact. We affirm the trial court's order denying McMorrow's petition for post-conviction relief and his motion requesting appointment of counsel.
ERICKSTAD, C.J., and VANDE WALLE, SAND and PAULSON, JJ., concur.
NOTES
[1]  For example, McMorrow contends that the trial court demanded excessive bail during his pretrial confinement. However, the record contains no facts stating the amount of bail or reasons explaining why it was excessive. Similarly, McMorrow claimed his due process rights were violated at adjustment committee hearings and administration isolation committee hearings. Again, no details of these alleged violations are contained in the record.

McMorrow also alleged he suffered cruel and unusual punishment during incarceration because his medical needs were not attended to. The record shows that McMorrow's main complaint was sore teeth and that he did receive some dental treatment. He did not show that he had any serious medical needs that were not met. The personal hardships McMorrow suffered during incarcerationloss of his business, death of his father-in-law, and divorce from his wifedo not constitute cruel and unusual punishment or a denial of due process by prison officials. Similarly, lack of television and telephone privileges during pretrial confinement were not constitutional violations.
[2]  Section 29-32-05, NDCC, states that the expenses of legal representation shall be made available to indigent applicants. This language raises the issue of whether or not "shall" means "must." "Shall" is generally mandatory; however, it is interpreted as permissive when necessary to give effect to legislative intent. 73 Am.Jur.2d Statutes §§ 22, 25; 82 C.J.S. Statutes § 380(a). In Northwestern Bell Telephone Company v. Wentz, 103 N.W.2d 245, 254 (N.D.1960), and Anderson v. Peterson, 78 N.D. 949, 967, 54 N.W.2d 542, 552-53 (1952), the word "shall" was construed as permissive to give effect to legislative intent.

Although "shall" generally is mandatory, when "shall" is used by the Legislature in a grant of authority to the courts the word "shall" is interpreted to mean "may." 82 C.J.S. Statutes § 380(a). See In re Elliott, 74 Wash.2d 600, 607, 446 P.2d 347, 353 (1968). In order to safeguard the American system of government containing separate powers in the legislative, executive, and judicial branches, the inherent powers of each branch must be preserved free from infringement by another branch. State ex rel. Harrington v. Genung, 300 So.2d 271, 272 (Fla.App.1974). Even if the Legislature intended the statute to be mandatory, "it must be subject to the necessary limitation that a proper case has been made out for the exercise of the power." Simmons v. State, 160 Fla. 626, 629, 36 So.2d 207, 209 (1948) (quoting Flagan v. Robbins, 96 Fla. 91, 100, 117 So. 863, 866 (1928)).
The word "shall" in § 29-32-05, NDCC, must be interpreted as merely directory and not mandatory. The court shall provide an indigent applicant with an attorney only when the proper case is before it.
