
374 Mass. 337 (1978)
372 N.E.2d 770
STEPHEN F. BLANEY, JR. & others
vs.
COMMISSIONER OF CORRECTION & another.[1]
Supreme Judicial Court of Massachusetts, Suffolk.
November 10, 1977.
February 6, 1978.
Present: HENNESSEY, C.J., BRAUCHER, WILKINS, LIACOS, & ABRAMS, JJ.
*338 Terence M. Troyer, Assistant Attorney General, for the defendants.
Arlene Marcus (Joseph Flynn with her) for the plaintiffs.
WILKINS, J.
On November 20, 1974, Stephen F. Blaney, Jr., an inmate of the Massachusetts Correctional Institution at Walpole (Walpole), filed on his own behalf a petition for a writ of mandamus in which he challenged the conditions of his protective custody in Block 10 at Walpole. Since then, Blaney's action has been joined with others, collectively known as the protective custody cases, and the collective custody cases have been ordered to proceed as a class action on behalf of all present and future protective custody inmates under the jurisdiction of the Massachusetts Department of Correction (department).
This action was referred to the Honorable R. Ammi Cutter, a former Justice of this court. He filed a report on January 28, 1975, describing the conditions in Block 10 where the plaintiff and others were held in protective custody. Those conditions were less agreeable to inmates than custodial conditions in the general prison population at Walpole. Block 10 inmates were confined to their cells at least twenty-three hours each day. They had very limited exercise facilities, no work program, restricted bathing opportunities, and no substantial opportunity to mingle or take meals with other prisoners. The conditions of their confinement were similar to those imposed on prisoners guilty of disciplinary infractions. Block 10 was regarded, however, as the safest place at Walpole.
The special master found that protective custody is an important function of the department because of the witness immunity statute (G.L.c. 233, §§ 20C-20I). Immunized witnesses might well be confined, on conviction of crimes unrelated to their immunity, with persons convicted on the basis of the testimony of those immunized witnesses. Protective custody inmates are not held in protective custody for disciplinary infractions, but because of their need for protection and safety.
*339 The special master concluded that reasonable protective custody was not being afforded in Block 10. He stated that reasonable care of a prisoner in custody should be determined by the standards of prison treatment afforded, and regarded as adequate, in other States whose authorities intended in good faith to provide humane, decent, and healthy rehabilitation and confinement of criminals. Relying on G.L.c. 127, § 32,[2] and expressly not reaching any constitutional question, the special master concluded that all prisoners, not guilty of disciplinary infractions, were entitled to substantial equality of treatment in so far as their special circumstances permitted. He also concluded that Blaney was not afforded the treatment to which he was entitled, and that reasonable protective custody requires (a) safe confinement, (b) some opportunity to associate and eat with nondangerous prisoners, (c) access to recreational and religious facilities, television, radio, and books, and (d) opportunities for study, work, exercise, and proper medical care.
A single justice of this court confirmed the special master's report and ordered that the defendants take measures necessary to provide Blaney reasonable protective custody, as defined by the special master, and that they submit proposed regulations to ensure reasonable protective custody in the future. As time passed, it appeared that the defendants may have misapprehended their duties under the order in that the plan they filed for the care of protective custody inmates did not accord Block 10 inmates any treatment materially different from that offered when the proceedings commenced. Consequently, on November 12, 1975, the single justice issued an interpretive memorandum, and held in abeyance contempt proceedings against the defendants. In that memorandum he elaborated on the *340 duties of the defendants and made certain suggestions for changes in the conditions of confinement.
The defendants still failed to heed the court's directions. They next filed revised plans for protective custody inmates which again conspicuously failed to deal with conditions in Block 10. On January 27, 1976, the single justice filed a further memorandum seeking to guide the defendants and ordering them to file another revised plan. On February 13, 1976, the defendants filed still another deficient protective custody plan. Through counsel, the defendants stated that they did not believe that changes in Block 10 were practicable. On March 1, 1976, the single justice referred the matter to the special master, once again, to consider the defendants' failure to comply with the Justice's orders and all other unresolved issues.
The special master filed his second report on October 14, 1976. The defendants modified their position during the hearings before the special master and indicated that Block 10 would no longer be used for protective custody. The special master found that the Commissioner of Correction (Commissioner) considered the improvement of conditions for protective custody confinement less important than the alleviation of general overcrowding. The special master found that the protection of inmates from their fellows entails special costs, and that the Commissioner had "real difficulties in obtaining adequate appropriations to perform his important and varied duties." The special master recommended a detailed order which would impose certain specific obligations on the defendants.
On April 5, 1977, the single justice confirmed the special master's report and entered the judgment from which the defendants appeal. That judgment gave explicit directions concerning the continued classification of protective custody inmates. It authorized the continued use of Block B-9 at Walpole and of the Receiving Building at the Massachusetts Correctional Institution at Norfolk for the confinement of protective custody inmates, subject, however, to their explicit rights to exercise, to have visits, to associate *341 with certain other inmates, and to be out of their cells for not less than three hours a day. The judgment declared that "protective custody inmates are entitled, in principle, to the standard of treatment they would receive in the classifications to which normally they would be severally assigned, modified negatively, however, to the extent made necessary by the special security or other measures that must be taken in their behalf...." The judgment directed the defendants to file quarterly reports stating the progress made toward attaining this standard. It also continued in effect the appointment of the special master. The court retained jurisdiction to supervise the defendants' performance. We need not consider here other provisions of the carefully prepared judgment.
Although the plaintiffs advance constitutional arguments in support of the judgment, we are concerned here first with a statutory issue. The single justice construed G.L.c. 127, § 32, as imposing an affirmative duty on the defendants, concluded that the defendants were not fulfilling that duty, and, with increasing precision wrought of enduring patience, directed the defendants to perform their duties.
The defendants argue that the single justice misinterpreted G.L.c. 127, § 32. They agree that G.L.c. 127, § 32, establishes minimum standards for the treatment of nondisciplinary prisoners, but argue that the single justice improperly construed § 32 to entitle every prisoner to treatment identical to "that afforded to every other prisoner of like demeanor." The single justice did not adopt such a construction of § 32. He acknowledged that the status of protective custody inmates might require that their treatment be "modified negatively" for reasons of special security. The purpose of § 32 and of the judgment from which the defendants appeal is to assure equal treatment, as far as may reasonably be, for prisoners who are not being disciplined. Protective custody inmates ordinarily should not be extended any less "kindness" than the general inmate population. Attempts must be made to satisfy the defendants' obligation *342 under § 32, and we find nothing in the judgment of April 5, 1977, which misconstrues those obligations.
The defendants complain that the judgment fails to recognize the Commonwealth's interest in controlling its revenue. This contention, raised somewhat belatedly, lacks any substantial documentation in the facts. Section 32 is a legislative mandate. The department, of course, has limited funds, but the defendants have not shown that they could not fulfil the mandate of § 32 within the appropriations of the department or that the Legislature has declined to appropriate funds necessary to permit the defendants to fulfil their statutory duty.[3]
We see no merit in the claim that the scope of the judgment intrudes into the executive branch in violation of art. 30 of the Declaration of Rights of the Constitution of the Commonwealth concerning separation of powers. Courts traditionally have issued orders, formerly called writs of mandamus, directing public officials to carry out their lawful obligations. If such an official fails to obey the order to fulfil his obligations, he risks contempt of court. Consistent with the proper judicial function, a judge, whose orders have been ignored or misunderstood, may state more explicitly the steps to be taken and may order the filing of compliance reports in order to achieve obedience to the judicial mandate. See Colabufalo v. Public Bldgs. Comm'r of Newton, 336 Mass. 205, 212 (1957); Wisconsin v. Illinois, 289 U.S. 395, 405-406 (1933). As to judges' authority to fashion detailed orders to correct established violations of constitutional rights, see Swann v. Charlotte-Mecklenburg Bd. of Educ., 402 U.S. 1, 15 (1971), and United States v. Montgomery County Bd. of Educ., 395 U.S. 225, 234-236 (1969). Such functions are judicial, and in no way usurp the *343 power of the executive.[4] Under the judgment, the administrative function of detailing compliance plans rests exclusively with the department. See School Comm. of Springfield v. Board of Educ., 362 Mass. 417, 447 (1972).
Judges do not want to become involved in the details of the operation of executive departments. The single justice and the special master faced the defendants' intransigence with considerable restraint. The defendants were given every opportunity to comply with the requirements of § 32 before the entry of the judgment of April 5, 1977. Considering the defendants' continuing failure to satisfy their statutory obligations, the single justice had ample authority to enter that judgment.
Judgment affirmed.
NOTES
[1]  The acting superintendent of the Massachusetts Correctional Institution at Walpole was also named as a defendant.
[2]  General Laws c. 127, § 32, as amended through St. 1957, c. 777, § 11, reads: "The superintendents of the institutions under the supervision of the department of correction shall treat the prisoners with the kindness which their obedience, industry and good conduct merit."
[3]  If the defendants established both of these facts, or if § 32 were repealed, underlying constitutional questions, such as claims of cruel and unusual treatment and of denial of equal protection of the laws, would have to be faced. In such circumstances, the unavailability of funds would not be a defense.
[4]  Indeed, the executive's refusal to obey such judicial orders itself seems to violate art. 30, by abrogating judicial decrees, an exclusively judicial function.
