Petitioners were pretrial detainees in the Canyon County jail at the time they filed a petition for writ of habeas corpus alleging deprivation of constitutional rights guaranteed by the United States and Idaho constitutions. Petitioners alleged their cells were overcrowded and that the living space per inmate was insufficient to meet constitutional minimum requirements. On occasion, after deducting the space occupied by bunks, there remained less than 5V2 square feet of floor space per person. Prisoners were made to remain in those small areas for more than 72 hours at one time; only one of the five cell areas contain a shower and showers were provided to those locked in the other four areas at the whim of respondents. Petitioners alleged all correspondence, incoming and outgoing, was censored by respondents and in some instances copied to be used in criminal actions. Mail was withheld without notice to prisoners. Petitioners allege they were denied access to the courts in that the Canyon County jail has no law library; the petitioners were allowed virtually no phone calls to their court-appointed attorneys or the various courts of the state. Petitioners alleged the policy of the jail restricting visits to members of the immediate family is a deprivation of their first amendment right of association. Petitioners allege they were provided no recreation or exercise, there were inadequate hygiene supplies, and there was inadequate health care.
Following a hearing on the merits, the trial court denied petitioners’ request for relief after encouraging the sheriff to change certain practices.
The issues presented on appeal are (1) whether the conditions in the Canyon County jail result in a deprivation of constitutional rights; and (2) whether appellants have standing to maintain this action.
The proper focus of inquiry into the constitutionality of conditions or restrictions of pretrial detention was set forth by the United States Supreme Court in Bell v. Wolfish, 441 U.S. 520, 99 S.Ct. 1861, 60 L.Ed.2d 447 (1979); that is, whether the conditions amount to punishment of the detainee. Under the due process clause, a detainee may not be punished prior to an adjudication of guilt. The courts must determine whether the condition or restriction is imposed for the purpose of punishment or whether it is but an incident of some other legitimate governmental purpose. In Bell, supra, 99 S.Ct. at 1873, the court stated:
“The factors identified in [Kennedy v. ] Mendoza-Martinez [372 U.S. 144, 83 S.Ct. 554, 9 L.Ed.2d 644 (1963) ] provide useful guideposts in determining whether particular restrictions and conditions *230accompanying pretrial detention amount to punishment in the constitutional sense of that word. A court must decide whether the disability is imposed for the purpose of punishment or whether it is but an incident of some other legitimate governmental purpose. See Flemming v. Nestor, supra, 363 U.S. [603] at 613-617, 80 S.Ct. [1367] at 1374-1376 [4 L.Ed.2d 1435 (1960) ]. Absent a showing of an expressed intent to punish on the part of detention facility officials, that determination generally will turn on ‘whether an alternative purpose to which [the restriction] may rationally be connected is assignable for it, and whether it appears excessive in relation to the alternative purpose assigned [to it].’ Kennedy v. Mendoza-Martinez, 372 U.S., at 168-169, 83 S.Ct. at 567-568; see Flemming v. Nestor, supra, 363 U.S. at 617, 80 S.Ct. at 1376. Thus, if a particular condition or restriction of pretrial detention is reasonably related to a legitimate governmental objective, it does not, without more, amount to ‘punishment.’ Conversely, if a restriction or condition is not reasonably related to a legitimate goal— if it is arbitrary or purposeless — a court permissibly may infer that the purpose of the governmental action is punishment that may not constitutionally be inflicted upon detainees qua detainees. See ibid. Courts must be mindful that these inquiries spring from constitutional requirements and that judicial answers to them must reflect that fact rather than a court’s idea of how best to operate a detention facility. Cf. United States v. Lovasco, 431 U.S. 783, 790, 97 S.Ct. 2044, 2049, 52 L.Ed.2d 752 (1977); United States v. Russell, 411 U.S. 423, 435, 93 S.Ct. 1637, 1644, 36 L.Ed.2d 366 (1973).”
The court in Bell, supra, also noted that the primary purpose of pretrial detention is to assure the defendant’s presence at trial, but the government also has legitimate interests that stem from its need to manage the facility in which the individual is detained. The court held that
“Restraints that are reasonably related to the institution’s interest in maintaining jail security do not, without more, constitute unconstitutional punishment, even if they are discomforting and are restrictions that the detainee would not have experienced had he been released while awaiting trial.” Bell v. Wolfish, 99 S.Ct. at 1874.
We turn now to the specific allegations of the petitioners.
OVERCROWDING
Adult pre-trial detainees at Canyon County jail are housed primarily in the fourth floor bullpen area in five cells. Four of the cells have a total floor space of ninety-six square feet each and the fifth has a total floor area of one-hundred sixty-eight square feet. Three of the smaller cells are furnished with six wall-mounted bunks in double tiers, a sink with hot and cold water, and a toilet. The fourth of the smaller cells and the largest cell are the same with the exception of having five instead of the six bunks. None of the smaller cells have a shower. The inmates are allowed out of their cells for a period of one to two hours per day, weekdays, for showers and recreation in the day room. They are also allowed out for visits, phone calls, attorney consultations, and trips to the dentist, doctor or court.
Each cell has at least one window with a gridded screen which permits sunlight and affords the inmates a view of the sky, but not of the ground. The cells are bright and clean, well ventilated, free of insects and rodents, and are open to view at all times. Depending on the number of pretrial detainees in custody, the number of inmates per cell varies from one to six.
Many federal courts have considered conditions of overcrowding at prisons and jails. The courts have considered the length of detentions, the number of hours per day the inmates are confined to their cells, the number of persons confined to each cell, the rated capacity of the facility, whether the population exceeds that capacity and if so whether the excess is temporary or permanent.
*231In the cases granting relief, the prisons or jails were grossly overcrowded. In Jones v. Diamond, 636 F.2d 1364, 1373 (5th Cir.1981) the court disapproved of the conditions, finding that:
“In the daytime, prisoners were confined to the day room in such numbers that at times there was little more than six square feet per inmate. The west bullpen held eighteen inmates (in three six-bunk cells), and had only eleven square feet per person, including space occupied by tables. Conditions in the east bullpen, which held thirty inmates (five six-bunk cells), were worse and sometimes during the day there was only 6.8 square feet of space per person, including table space____ Prisoners often slept on mattresses laid on the floor or on tables in the day room.”
In Capps v. Atiyeh, 495 F.Supp. 802 (Or. 1980), prisoners were required to sleep on the floor, dayrooms were converted into dormitories, extra beds were placed in the dormatories, all resulting in a situation where the prisoners were “packed to the rafters.” The average prisoner was required to spend eleven hours per day in his cell in the summer and twelve and one-half hours per day in the winter. The court in Capps, supra, stated that the cell space accorded inmates fell far below the recommended area by professional standards. (The August, 1977, standards of the American Correctional Association require that 60 square feet of cell space be accorded prisoners spending no more than ten hours per day in their cells, and that eighty square feet of cell space be accorded prisoners spending more than ten hours per day in their cells.) The court in Capps, supra, in holding the crowding constitutes cruel and unusual punishment, stated the following factors are to be considered:
“(1) the duration of the prisoners’ confinement; (2) the degree to which the population exceeds the institution’s design capacity; (3) the size of the inmates’ quarters and the number of hours per day the inmates must spend in those quarters; (4) the effects of the increased population on the prisoners’ mental and physical health; and (5) the relative permanency of the crowded conditions.”
Detainees at the Canyon County jail spend approximately twenty-two to twenty-three hours per day in their cells. The number of detainees in each cell fluctuates from one to six. When five persons are housed in the smaller cell the floor space per person is nineteen feet and at six persons it is sixteen square feet. When the space taken up by the six bunks is deducted the result is three to four square feet of living space per person, less than one fourth the space required by the American Correctional Association standard.
The district court held that while this amount of space may be sufficient while sleeping, it is inadequate while the detainees are awake. The court, while not finding that the overcrowding of the smaller cells was punitive in nature, advised that the confinement of more than two inmates in the smaller cells should be limited and if it were necessary to confine more than two in the cell the respondents should consider allowing the detainees out of their cells for longer periods of time.
Petitioners, at the time the petition was filed, had been confined from 30 to 307 days, an average of 135 days per person. There was evidence that the conditions resulted in increased violence and sexual harrassment.
We hold that the conditions of crowding which existed in the Canyon County Jail at the time this action was initiated did in fact fail to meet reasonable standards. However, since the trial court did order remedial action eliminating the overcrowding, no ground for granting habeas corpus remains.
We direct the district court to periodically monitor the subject practice to insure that the remedial action it ordered is being continued in effect.
Petitioners allege that all correspondence is opened and censored by the jail officials and that mail is withheld without notice to *232the detainee. The trial court found that the inmates’ general correspondence, incoming and outgoing, is screened by officials, i.e., read for basic content and the envelope checked for contraband. Incoming privileged mail is opened in the presence of the inmate and checked for contraband. Outgoing privileged mail is sealed and not screened. When booked into the jail, prisoners are asked to sign a consent form consenting to the screening of general correspondence. If the form is not signed, the mail is not screened but rather is held until the inmate’s release.
In Procunier v. Martinez, 416 U.S. 396, 94 S.Ct. 1800, 40 L.Ed.2d 224 (1974), the court held that security and governmental interest justifies the imposition of certain restraints on inmate correspondence. Such interference was held to be justified if the regulation or practice in question furthers an important or substantial governmental interest such as security, order, or rehabilitation. Procunier, supra, held that the limitations of first amendment freedoms must be no greater than is necessary or essential to the protection of the particular governmental interest involved. Id. at 413, 94 S.Ct. at 1811. ■
It is clear that the screening of mail for escape plans, obscene material, violation of prison rules, and contraband furthers a substantial governmental interest. The district court noted some isolated incidents of failure to notify the inmate when his mail was withheld but did not find the failure to amount to constitutional deprivation. Notification of withheld mail must be given to the inmate in the future.
Petitioners’ primary complaint with the mail policies was the prohibition of receipt of “sexually provocative” material, particularly magazines such as Penthouse and Playboy and correspondence from several “lonely hearts” clubs. Petitioners contend that while the jail may prohibit obscene materials its mail policies are overbroad resulting in the banning of materials which are not obscene. Guajardo v. Estelle, 580 F.2d 748, 761 (5th Cir.1978), dealt with a similar situation:
“Adoption of [the rule that only materials declared judicially to be obscene may be banned] would merely state a truism since the Supreme Court has categorically settled that obscenity is outside the first amendment’s protections. [Citations omitted.] Other circuits have noted that prison officials may deny prisoners access to materials that are not obscene. Aikens v. Jenkins, 534 F.2d 751 (7th Cir.1976). We think such a rule is mandated by the prison environment. The first amendment rights of the prisoners cannot be evaluated without reference to that environment and to the type of audience it involves.”
As in Guajardo, here there was testimony of nonconsensual homosexual conduct. The stimulation that may come from “sexually provocative” material may result in further criminal activity.
Before delivery of a publication may be refused, jail administrators must review the particular publication in question and make a specific, factual determination that the publication is detrimental to prisoner rehabilitation because it would encourage deviate, criminal sexual behavior. Prisoners must, of course, be allowed to appeal that decision through proper administrative channels. We have reviewed the items admitted into evidence which were withheld because they were “sexually provacative.” We conclude that the jail administrators exercised proper discretion in determining that distribution of the subject materials would be detrimental to operation of the facility.
VISITATION
Pretrial detainees are allowed non-contact visits from their immediate family twice a week from 12:00 to 2:00 p.m. Each detainee is allowed to visit for thirty minutes each visiting day. Respondents assert this restriction is mandated by staffing limitations and the need to accommodate all family members appearing on a given day. *233Jones v. Diamond, 594 F.2d 997, 1013 (5th Cir.1979), addressed this issue:1
“In the absence of such overpowering considerations as a threat to jail security, if a jailer were to refuse to allow the ordinary detainee any visitation privileges, or if he were to lay down arbitrary or capricious limitations on the privilege, such conduct would be unconstitutional, Procunier v. Martinez, 416 U.S. 396, 411, 412, 94 S.Ct. 1800 [1810, 1811], 40 L.Ed.2d 224 (1974). The true rule is that the jailer must decide how many hours a week visits are feasible, considering the physical limitations of the jail and the reasonable internal and external needs of the facility, see Pell v. Procunier, 417 U.S. 817, 94 S.Ct. 2800, 41 L.Ed.2d 495 (1974). Visitation privileges for ordinary detainees should be set forth in written rules in order that the detainees may understand them and so that the courts may have a definite basis for review in the face of claimed arbitrariness and capriciousness.” (Emphasis in original.)
The visitation rules at Canyon County jail are applied equally to all detainees and there was no evidence that they were being applied arbitrarily or capriciously and thus petitioners’ complaints in this regard are without merit.
ACCESS TO THE COURTS
Petitioners assert they were denied access to the courts because the Canyon County jail did not provide them access to a law library nor an attorney to represent them in civil matters. Further, the jail did not provide paper, pens and legal pads, copying machines or typewriters. The trial court held that since petitioners were represented by counsel in their criminal cases they did not require access to a law library. Additionally, the court noted that these particular detainees were not denied access since petitioner Schwartzmiller’s criminal attorney had provided him with one-hundred nineteen law books and there was no evidence petitioners’ pleadings or other documents were not filed or sent to the court in a reasonably prompt manner. The trial court correctly found there was no evidence of lack of supplies.
In Leeds v. Watson, 630 F.2d 674 (9th Cir.1980), the court held that prisoners in the Kootenai jail were denied meaningful access to the courts. There was no law library at the Kootenai jail and access to the county library required an order of court permitting use of the library only when accompanied by a guard. The court held that the availability of public defenders did not satisfy the Bounds v. Smith, 430 U.S. 817, 97 S.Ct. 1491, 1498, 52 L.Ed.2d 72 (1977), requirement:
“[T]he fundamental constitutional right of access to the courts requires prison authorities to assist inmates in the preparation and filing of meaningful legal papers by providing prisoners with adequate law libraries or adequate assistance from persons trained in the law.”
It is the policy of the Canyon County jail to deny a detainee direct access to the county law library and provide books only if he can prevail upon his criminal attorney to procure and deliver them. Bounds made clear that there is no absolute right to a law library, if an alternative means is provided, either by the use of paralegals or paraprofessionals. The sheriff is directed to explore and provide alternative methods of meaningful access to the courts for detainees. The fact, alone, that a detainee is represented in his criminal action, is insufficient to fulfill this constitutional right.
Petitioners encountered difficulty in filing certain papers with the courts of Canyon County. The papers were finally forwarded to the court by the criminal attorney of one of the petitioners because the jailers did not forward or deliver them. Additionally, two subpoenas requested by petitioners were not served and no reason was given as to why they were not served.
*234The legal papers finally having been filed by a petitioners’ attorney, and the evidence which the witnesses would have testified to having been admitted in another form, harmless error resulted. However, the refusal or failure of jail officials to file the papers and deliver subpoenas is a denial of a prisoner’s right to access to the courts and such refusal is strongly disapproved.
We have examined petitioners’ remaining allegations in support of issuance of a writ of habeas corpus and find them to be without merit.
Respondents contend petitioners have no standing and that this case is moot because the petitioners are no longer incarcerated in the Canyon County jail. This case falls into one of the exceptions to the mootness doctrine in that it is a case “capable of repetition, yet evading review.” Roe v. Wade, 410 U.S. 113, 93 S.Ct. 705, 35 L.Ed.2d 147 (1973). Pretrial detainees are held at the Canyon County jail for an average of six to eight months. Absent the applicability of this exception to the mootness doctrine, it is clear that pretrial detainees would not be afforded appellate review. Therefore, we have reached the merits of the case.
The decision of the district court is affirmed. Writ of habeas corpus is denied.
DONALDSON, C.J., concurs. SHEPARD and BAKES, JJ., concur in the result.. Jones v. Diamond, 636 F.2d 1364 (5th Cir. 1981), concerned only standards for "contact" visits which are not in issue here.