899 F.2d 753
JEFF D.;  Paula E.;  John M.;  and Dusty R., individuallyand on behalf of all minors similarly situated, byand through their next friend, CharlesJohnson III, Plaintiffs-Appellants,v.Cecil D. ANDRUS;  Richard Donovan;  George Bachik;  andWilliam G. Gruzenski, in their official capacitiesand their successors in office,Defendants-Appellees.
No. 87-3586.
United States Court of Appeals,Ninth Circuit.
Argued and Submitted Nov. 3, 1988.Decided Oct. 23, 1989.As Amended March 20, 1990.

Howard A. Belodoff, Idaho Legal Aid Services, Inc., Boise, Idaho, Charles Johnson, III, Johnson, Olson, Robison, Chartered, Pocatello, Idaho, for plaintiffs-appellants.
Michael De Angelo, Deputy Atty. Gen., Health and Welfare Div., Boise, Idaho, Jim Jones, Atty. Gen., Michael J. Reardon, Deputy Attorney General, State of Idaho, Department of Health & Welfare, State of Idaho, Boise, Idaho, for defendants-appellees.
Appeal from the United States District Court for the District of Idaho.
Before NELSON, BOOCHEVER and BRUNETTI, Circuit Judges.
BRUNETTI, Circuit Judge:


1
* A. STATEMENT OF FACTS


2
Appellants are over 2,000 indigent children, from 8 to 17 years of age, who suffer from emotional and mental handicaps.  Evans v. Jeff D., 475 U.S. 717, 720 n. 1, 106 S.Ct. 1531, 1534 n. 1, 89 L.Ed.2d 747 (1986).  Appellees are the Governor of Idaho, Director of the Idaho Department of Health and Welfare, Administrator of State Hospital South, and Clinical Director of State Hospital South.  Many of these children have been confined to adult psychiatric wards of state hospitals and other facilities or in out-of-state institutions located far from their homes and families.  The appellants allege that these children have not received minimal mental health services as required by law.  These children would benefit and recover more successfully if community mental health care services geared to juveniles were provided.  The fact that some juveniles are sent out of state or to adult facilities has hindered their recovery.  For example, State Hospital South (SHS) does not have a child psychiatrist or other qualified staff to provide specialized juvenile treatment and services.  Some children were placed in facilities where there was contact with adult patients.  Some of these adult patients might have been committed because of child molestation or other criminal conduct.  As a result, some of the adult patients have had sexual encounters with or have inflicted injury on these children.


3
At age 15 appellant Jeff D. was committed by a state court to the custody of the director of the Idaho Department of Health and Welfare under the Idaho Mental Health Act.  He was diagnosed as being emotionally disturbed and mildly retarded.  He was initially housed at SHS, but was subsequently committed under the Youth Rehabilitation Act for criminal behavior and sent to the Youth Services Center, a facility of the Idaho Department of Health and Welfare.


4
At age 15 appellant Paula E. was committed by a state court to the custody of the director of the Idaho Department of Health and Welfare.  She was diagnosed as suffering from a borderline personality disorder and mild mental retardation.  She had previously been placed by SHS in an out-of-state facility designed to handle problem children.  She was forced to leave this facility due to severe aggressive behavior and was returned to SHS.


5
At age 15 John M. was admitted to SHS for evaluation under the Youth Rehabilitation Act.  He was diagnosed as suffering from emotional problems, possible mental retardation and other handicaps.  He had experienced problems caused by antisocial behavior.  After being placed at SHS for a short period of time, he was sent to an out-of-state facility which was under contract with the Idaho Department of Health and Welfare.


6
At 12 years of age, Dusty R. was committed to SHS for evaluation under the Youth Rehabilitation Act due to behavioral problems.  Dusty R. has spent time in several Idaho facilities, including St. Alphonsus Hospital in Boise and the Idaho Youth Ranch.

B. PROCEDURAL HISTORY

7
On August 4, 1980, the complaint in this case was filed on behalf of 2,000 indigent juveniles.  On December 24, 1980, the parties stipulated to the numerosity requirement of Rule 23 as a first step towards class certification.  On April 10, and later on November 4, 1981, the appellants submitted a motion for class certification with supporting briefs and affidavits.  The appellees did not respond to any of these papers.  On May 24, 1982, the district court conditionally granted class certification but instructed the parties to arrive at a class definition by negotiation.  Between June 2 and September 7, 1982, the parties negotiated the meaning of categories of the classes of children involved in this litigation.  On September 7th, the parties stipulated to class certification and the district court signed the order approving the stipulation (Stipulation).  The Stipulation For Class Certification and Order reads as follows:


8
Come now the parties to the above entitled cause of action and hereby stipulate that the class in this matter may be defined as follows:


9
All Idaho juveniles under the age of eighteen (18) years who have been or will be diagnosed by the Idaho State Department of Health and Welfare as suffering from emotional or mental illness, either alone or in conjunction with another mental defect(s), and because of such condition are placed in, or committed to, the care and custody of the Idaho State Department of Health and Welfare as follows:


10
A.   In residence at State Hospital South, Blackfoot, Idaho, or State Hospital North, Orofino, Idaho;


11
B. In residence in any institution outside of the State of Idaho;  or


12
C. In residence in any facility for the treatment, detention or housing of such youths within the state of Idaho specifically excluding the Idaho State School and Hospital in Nampa, Idaho.


13
Thereafter, the parties settled the mental health claims and the district court approved the Stipulation Settling Mental Health Claims (Settlement Agreement) in an order dated April 28, 1983.  The appellants appealed the fee waiver provision in the Settlement Agreement on May 26, 1983.  On appellees' motion, the district court in an order dated August 12, 1983 suspended appellees' performance under the Settlement Agreement pending the appeal.  On September 26th, 1983, this court vacated the district court's decision and ordered appellees to comply with the Settlement Agreement.  The district court did not hold a compliance hearing and appellees did not comply with the Settlement Agreement.


14
A year later, on October 22nd, 1984, appellees obtained another order from the district court delaying any discovery and all matters regarding the case pending appeal of the fee waiver.  On November 6, 1984, this court vacated the district court's order and ordered appellees to comply with the Settlement Agreement, and on December 3, 1984, we reversed the district court on the fee waiver provision and ordered the Settlement Agreement enforced.  Jeff D. v. Evans, 743 F.2d 648 (9th Cir.1984).  Appellees petitioned for certiorari the issue of fee waiver to the U.S. Supreme Court and at the same time, sought to exclude some juveniles from the class definition in a Motion to Clarify Scope of Class filed in the district court.  The district court refused to consider appellees' pending motion and refused to enforce the Settlement Agreement pending the review of the fee waiver provision by the Supreme Court.  For the third time, on September 30, 1985, this court ordered the appellees to comply with the Settlement Agreement and held that the district court retained jurisdiction under Fed.R.Civ.P. 62(c) during the pendency of the Supreme Court appeal.  Pursuant to our order, the appellants renewed their motion for compliance and the district court held a hearing on the matter.  At the hearing, appellees stated that unless the district court excluded class members as outlined in their Motion to Clarify Scope of Class, they would have to admit noncompliance with the Settlement Agreement.


15
On April 21, 1986, the U.S. Supreme Court upheld the fee waiver provision, finding that the district court did not abuse its discretion in "upholding a fee waiver which secured broad injunctive relief, relief greater than that which appellants could reasonably have expected to achieve at trial."    Evans v. Jeff D., 475 U.S. 717, 743, 106 S.Ct. 1531, 1545, 89 L.Ed.2d 747 (1986).  After receiving supplemental briefs on the issue, on December 31, 1986, the district court ordered (Clarification Order) that the class members which the appellees sought to remove from the class definition be excluded from the benefits of the Settlement Agreement.  The plaintiffs timely appealed from the district court's Clarification Order, (this Case No. 83-3586), and we have jurisdiction under 28 U.S.C. Sec. 1291 and Sec. 1292(a)(1).  On November 18, 1987, in response to plaintiffs' motion for a compliance hearing as to the undisputed members of the class, the district court ruled it had been divested of jurisdiction by the notice of appeal from the December 31st Clarification Order.  Then plaintiffs timely appealed that ruling in Case No. 87-4377.  The appeals were consolidated and on November 16, 1988, we issued an order in appeal No. 87-4377 directing the district court to conduct a compliance hearing as to the undisputed members of the class and issued the mandate immediately, retaining jurisdiction over all future matters arising out of this case.

C. STANDARD OF REVIEW

16
Appellees argue we must apply the abuse of discretion standard under Rule 23(c)(1) which provides that the district court may alter or amend the class "before the decision on the merits."    That rule is inapplicable here.  The district court had on April 28, 1983, entered a "final judgment" in the form of an order approving the Stipulation Settling Mental Health Claims (Settlement Agreement) and contrary to appellees' assertion, except in the face of egregious error, it could not alter the class under Rule 23.  Fed.R.Civ.P. 23(c)(1);  Officers For Justice v. Civil Serv. Com'n., Etc., 688 F.2d 615, 633 (9th Cir.1982), cert. denied, 459 U.S. 1217, 103 S.Ct. 1219, 75 L.Ed.2d 456 (1983).  Appellees, in the alternative, contend that the Clarification Order is a modification of a consent decree (like modifying an injunction) subject to the abuse of discretion standard.  However, courts are not permitted to modify settlement terms or in any manner to rewrite agreements reached by parties.  Holmes v. Continental Can Co., 706 F.2d 1144, 1160 (11th Cir.1983).  The court's power to approve or reject settlements does not permit it to modify the terms of a negotiated settlement.  Evans v. Jeff D., 475 U.S. at 727, 106 S.Ct. at 1537;  3B Moore's Federal Practice at p 23.80 (2d ed. 1987).  It may only approve or disapprove the proposal.


17
Rule 23(e) wisely requires court approval of the terms of any settlement of a class action, but ... does not authorize the court to require the parties to accept a settlement to which they have not agreed....  The District Court could not enforce the settlement on the merits and award attorney's fees any more than it could, in a situation in which the attorney had negotiated a large fee at the expense of the plaintiff class, preserve the fee award and order greater relief on the merits.


18
Evans v. Jeff D. 475 U.S. at 726-27, 106 S.Ct. at 1537.


19
Finally, the district court did not make factual determinations on the merits of this case to ascertain whether certain individuals were to be included in the class, but merely redefined the categories of the class members.  By excluding certain class members from the benefits of the Settlement Agreement, the district court did not change the language of the parties' Stipulation but defined the terms of the agreement, reinterpreting which children would benefit from the Settlement Agreement.  Interpretation of settlement agreements, like interpretation of contracts, are subject to de novo review.  Hunt Wesson Foods, Inc. v. Supreme Oil Co., 817 F.2d 75, 77 (9th Cir.1987) (if interpretation of a contract is based on analysis of language and application of principles of contract interpretation, review is de novo);  In re United States Fin. Sec. Litig., 729 F.2d 628, 631-32 (9th Cir.1984) (interpretation of settlement agreement when restricted to language of the settlement, like contracts, is subject to de novo review).  A district court's interpretation of a consent judgment is a matter of law and freely reviewable on appeal.  Keith v. Volpe, 784 F.2d 1457, 1461 (9th Cir.1986);  Vertex Distr. Inc. v. Falcon Foam Plastics, Inc., 689 F.2d 885, 892 (9th Cir.1982);  Kittitas Reclamation Dist. v. Sunnyside Valley Irrigation Dist., 626 F.2d 95, 98 (9th Cir.1980), cert. denied, 449 U.S. 1079, 101 S.Ct. 861, 66 L.Ed.2d 802 (1981).  The district court construes the language of a class definition in much the same way that it might construe the language of a contract or a statute.  We therefore conclude we review de novo the district court's analysis of the language of the class definition.  Miller v. Safeco Title Ins. Co., 758 F.2d 364, 367 (9th Cir.1985).


20
Although the district court indicated it had considered the entire record, it made no findings regarding the credibility of extrinsic evidence but looked only to the four corners of the Stipulation.  The court's interpretation was not based on extrinsic evidence but the meaning of the words in the Stipulation itself.  Therefore, the judge's order is subject to de novo review.  Id.

II
A. PRINCIPLES OF INTERPRETATION

21
We rely on basic contract principles to interpret the Stipulation.  An agreement to settle a legal dispute is a contract and its enforceability is governed by familiar principles of contract law.  Miller v. Fairchild Indus., 797 F.2d 727, 733 (9th Cir.1986);  Village of Kaktovik v. Watt, 689 F.2d 222, 230 and n. 62 (D.C.Cir.1982).  Each party agrees to "extinguish those legal rights it sought to enforce through litigation in exchange for those rights secured by the contract."    Village of Kaktovik, 689 F.2d at 230;  Protective Closures Co. v. Clover Inds., Inc., 394 F.2d 809, 812 (2d Cir.1968).  Since consent decrees and orders have many of the attributes of ordinary contracts, they should be construed basically as contracts.  Vertex Distributing, Inc., 689 F.2d at 892 (quoting United States v. ITT Continental Baking Co., 420 U.S. 223, 236-37, 95 S.Ct. 926, 934-35, 43 L.Ed.2d 148 (1975)).  Furthermore, enforceability of these compromise agreements is favored in the law.


22
The authority of a trial court to enter a judgment enforcing a settlement agreement has as its foundation the policy favoring the amicable adjustment of disputes and the concomitant avoidance of costly and time consuming litigation.


23
In re Springpark Assoc., 623 F.2d 1377, 1380 (9th Cir.)  (quoting Dacanay v. Mendoza, 573 F.2d 1075, 1078 (9th Cir.1978)), cert. denied, 449 U.S. 956, 101 S.Ct. 364, 66 L.Ed.2d 221 (1980).


24
The construction and enforcement of settlement agreements are governed by principles of local law which apply to interpretation of contracts generally.  Air Line Stewards v. Trans World Airlines, 713 F.2d 319, 321 (7th Cir.1983).  Here, we apply Idaho contract law, as the Settlement Agreement and Stipulation were entered into in Idaho and the parties are all residents of Idaho.  In re Beverly Hills Bankcorp, 649 F.2d 1329, 1332 (9th Cir.1981) (settlement agreement in class action bankruptcy suit governed by state not federal law).


25
In interpreting any provision in a contract, the entire agreement must be viewed as a whole.  St. Clair v. Krueger, 769 P.2d 579, 582, 115 Idaho 702 (1989).  Unless the writing was intended as a complete and exclusive statement of the terms of the agreement, the court may look to the intent of the parties, revealed by their conduct and language, and by the surrounding circumstances to determine if a particular subject of negotiation is embodied in the writing.  Interform Co. v. Mitchell, 575 F.2d 1270, 1277 (9th Cir.1978).  Under Idaho law, the court may interpret agreements in accordance with the parties' intention "even when the 'forms' they employed suggest otherwise."    Id. at 1276.    And, where the writing is not integrated or its meaning is not unambiguous, parol evidence is admissible.  Id.  Under Idaho law, a contract is ambiguous if it is reasonably subject to different interpretations.  Fuller v. Equitable Sav. and Loan Assn., 718 F.2d 951, 952 (9th Cir.1983) (citations omitted).


26
The district court indicated in its order of December 31, 1986 that it had "examined the entire record."    Insofar as it was intended to define the class referred to in the Settlement Agreement, the Stipulation is not an integrated agreement because it contains no language which would preclude the consideration of extrinsic evidence.  Also, the district court in its order did not refer to any extrinsic evidence or credibility determinations, which allows us to review his order de novo and not give deference to his interpretation.  Miller v. Safeco Title Ins. Co., 758 F.2d at 367.    The court looked only to the plain words of the Stipulation ("The Court wishes that plaintiffs' counsel had been successful in including such language in the stipulation....  It was plaintiffs' job to negotiate an agreement that included them.").


27
In construing the meaning of the Stipulation along with the Settlement Agreement, and in the context of the relevant Idaho statutes, Evans v. Jeff D., 475 U.S. 717, 106 S.Ct. 1531, 89 L.Ed.2d 747 (1986), and the correspondence representing the negotiations between the parties, we hold that the district court erred in its interpretation of the Stipulation.  When interpreting a stipulation, the district court should construe the language of a particular section in the context of the entire agreement and not read individual sections out of context to achieve a result not originally contemplated by the parties.  Air Line Stewards, 713 F.2d at 321-22.    The overriding purpose in interpreting a contract is to give effect to the mutual intent of the parties at the time the contract was made.  White v. Roughton, 689 F.2d 118, 120 (7th Cir.1982) (court construed consent decree using contract interpretation principles), cert. denied, 460 U.S. 1070, 103 S.Ct. 1524, 75 L.Ed.2d 947 (1983).


28
The first two paragraphs of the Settlement Agreement state its purpose in broad terms and the agreement does not limit its effects to certain children.  The purpose of this class action is, in brief, to provide the class of minor plaintiffs with segregation from adults, with housing in the least restrictive environment and with individualized treatment plans.  The district court agreed with plaintiffs that these minors should receive treatment in its Memorandum Opinion accompanying the Clarification Order.  Keeping this purpose in mind, we turn to the district court's December 31, 1986 Clarification Order which excluded the following children from the scope of the class:


29
1.   Minors who, immediately prior to admission to a facility designated in paragraphs A, B, or C, of the stipulation, were residents of a state other than Idaho;


30
2.   Minors who have not been diagnosed by the Idaho Department of Health and Welfare as suffering from an emotional or mental illness, but who are admitted to a facility in paragraphs A, B, or C of the stipulation for purposes of diagnosis;3.   Minors who have been committed for reasons other than mental illness, e.g., commitments under the Youth Rehabilitation Act or Child Protective Act.


31
4. Minors admitted to a facility other than the one for treatment, detention or housing of youths suffering from emotional or mental illness, e.g., the Youth Services Center;  and;


32
5.   Minors who voluntarily admit themselves to a facility.


33
We affirm in part and reverse in part, discussing each section of the Clarification Order separately.

B. INTERPRETATION OF THE STIPULATION

34
1. Residents of a state other than Idaho.


35
The district court found that the Stipulation covered only "Idaho juveniles" and not "minors who, immediately prior to admission were residents of a state other than Idaho."    Appellants agreed at oral argument that if a nonresident juvenile commits a crime or does some act that subjects that juvenile to custody under Idaho law, that juvenile is not a member of the class.  Appellants' concern was for those Idaho resident juveniles who were sent by the Department of Health and Welfare (Department) to facilities out of the state.  These juveniles should be members of the plaintiff class for two reasons.


36
First, the Stipulation unambiguously states in subsection B that Idaho juveniles, otherwise included, who are "in residence in any institution outside of the State of Idaho" are part of the class.  Second, an Idaho resident sent to an out of state facility does not lose his or her Idaho residency.  See Idaho Code Sec. 66-325 (Mitchie 1989) ("[n]one of the time spent in any facility shall be regarded as contributing toward, or acquiring, residence for any purpose.")    Also, the Settlement Agreement contemplates admission of class members to out of state facilities.  Therefore, Idaho resident juveniles sent to out of state facilities are covered by the Stipulation and entitled to the benefits of the Settlement Agreement.


37
2. Undiagnosed minors.


38
In the Clarification Order, the district court stated, "until an individual is so diagnosed [as suffering from emotional or mental illness, by the Idaho State Department of Health and Welfare], he or she is not entitled to the stipulated services."    Thus, the district court concluded that an individual undergoing evaluation but not yet diagnosed was not a member of the class.  However, the district court disregarded the fact that the Stipulation refers to Idaho juveniles


39
under the age of eighteen (18) who have been or will be diagnosed ... as suffering from emotional or mental illness ... and because of such condition are placed in, or committed to, the care and custody of the Idaho State Department of Health and Welfare.


40
(Emphasis added.)    The district court ignored the "will be diagnosed" phrase.  Whenever a minor is placed in or committed to the care and custody of the Health and Welfare Department at SHS, SHN or any of the places listed in paragraphs B or C of the Stipulation, that minor is in the class.  This includes those minors undergoing evaluation.


41
The limitation to those children who have already been diagnosed is in direct conflict with language in the Settlement Agreement.  The plain language of paragraph 9 of the Settlement Agreement requires that plaintiffs be provided with appropriate diagnosis and evaluation services:


42
The defendants shall provide plaintiffs with appropriately prescribed mental health services according to each plaintiff's individual treatment plan, including, where appropriate, diagnosis, evaluation, therapy and counseling.


43
(Emphasis added.)    See Little Earth of the United Tribes, Inc. v. United States Dept. of Housing & Urban Dev., 807 F.2d 1433, 1438 (8th Cir.1986) (law of the case doctrine applies to trial court's prior order).  The Stipulation and the Settlement Agreement are the two parts of an entire agreement which we interpret by construing the language of each in the context of the entire agreement.    Air Line Stewards, 713 F.2d at 321-22.    We hold that the Stipulation language, "will be diagnosed," interpreted together with the Settlement Agreement provisions for "diagnosis" and "evaluation" includes those juveniles "placed in or committed to" the custody of the Health and Welfare Department for the purposes of diagnosis and evaluation.


44
The district court's limitation is also in conflict with the purpose of the lawsuit and intent of the parties--which was to protect children in the custody of the Department from abuse from mentally ill adults and to give them proper care and treatment.  An undiagnosed juvenile could be placed in close proximity with adult patients while being evaluated, and receive a lower standard of care from those juveniles in the class as limited by the district court.  This result contradicts the purpose of the Settlement Agreement as stated in its first two paragraphs.


45
3. Juveniles not originally committed under the Mental Health Act.


46
In the district court's Clarification Order, the court said, "minors who have been committed for reasons other than mental illness under the Youth Rehabilitation Act (YRA) (for criminal acts) and the Child Protection Act (CPA) (for abandoned, neglected or abused children) are not members of the class."    We agree with that statement.  However, the court in its Memorandum Decision accompanying the order stated that "[i]f a child is only committed because of a criminal act or abandonment but is later--while in the Department's committment [sic] at one of the designated institutions--diagnosed by the Department as suffering from emotional or mental illness, that minor would not be a member of the class."    (Emphasis added.)    This precludes from the class all minors committed to the Department under the YRA or the CPA.  This is wrong and conflicts with the language and intent of the Stipulation.  At the time the minor is "placed in or committed to" one of the institutions designated in paragraphs A, B or C of the Stipulation and is or will be diagnosed by the Department as suffering from emotional or mental illness, that minor becomes a member of the class.  Our interpretation is supported by the relevant Idaho statutes, the Department's own publications, Evans v. Jeff D., 475 U.S. 717, 106 S.Ct. 1531, 89 L.Ed.2d 747 (1986), the Settlement Agreement and the parties' negotiations.


47
The Mental Health Act provides the sole authority to admit any juvenile to the Department's state hospital and mental health system, regardless of how they were originally committed to the Department's care and custody.  Idaho Code Secs. 66-317(b);  66-317(c);  66-318(a) and 66-334 (Mitchie 1989).  To accept the district court's interpretation would mean that a child committed under the YRA would not be entitled to the same protection of the Settlement Agreement as a child initially committed under the Mental Health Act.  The child would be unprotected even though he or she was diagnosed as having mental or emotional illness and subsequently admitted under the Mental Health Act to the same institution.  The Stipulation does not differentiate these children on the basis of how they entered into the system.  So long as "they have been or will be diagnosed" by the Health and Welfare Department and "are placed in, or committed to" the care of the Department in one of the facilities named in paragraphs A, B or C, they are included in the class.  To interpret the Stipulation otherwise allows the appellees control over who will receive the benefits of the Settlement Agreement by the manner in which the Department enters the child into the system.  The district court's exclusion of children originally brought into the care of the Department by the Youth Rehabilitation Act or the Child Protection Act from the class is a distinction without basis in the evidence and the Idaho statutes.  See Idaho Code Secs. 66-317(b), 66-317(c), 66-318(a)(6) and 66-334 (Mitchie 1989).


48
Furthermore, the appellees' Community Mental Health Program Policy and Procedures Manual in the Residential Treatment Services Section provides that


49
The Department of Health and Welfare has the primary treatment responsibility for children and youth adjudicated under the Idaho mental health civil commitment statutes, developmental disability statutes, the Youth Rehabilitation Act, and the Child Protective Act.  To accomplish this responsibility, the Department provides a network of residential and treatment services for children and youth in both community and institutional settings.    Seriously emotionally disturbed children and youth and those with lesser disabilities may be served by the variety of programs within this network, which includes foster care and group residential care.


50
(Emphasis added.)    The appellees, as required by the Settlement Agreement, prepared plans to provide services to the plaintiffs which included those committed under any statutory provisions.


51
Residential psychosocial rehabilitation is available for children and youth ages six to eighteen years who are committed to the Department of Health and Welfare under the state's Child Protective Act, Youth Rehabilitation Act, mental health statutes, and developmental disabilities statutes.


52
Exhibit G to Supplemental Brief of Plaintiffs on Class Certification.


53
The U.S. Supreme Court recognized the broad scope of the class provided for in the Stipulation when they upheld the fee waiver provision in the Settlement Agreement.  Evans v. Jeff D., 475 U.S. at 741-743, 106 S.Ct. at 1544-46.    The appellees' "exceptionally generous offer" and the "extensive structural relief" were an "adequate quid pro quo" for the waiver of attorney's fees;  "we understand the District Court's approval of the stipulation settling the health services claims to have rested on the determination that the provision waiving attorney's fees and costs was fair to the class--i.e., the fee waiver was exchanged for injunctive relief of equivalent value."    Id. at 741, 106 S.Ct. at 1544.    The Supreme Court held that the district court did not abuse its discretion "in upholding a fee waiver which secured broad injunctive relief, relief greater than that which plaintiffs could reasonably have expected to achieve at trial."    Id. at 743, 106 S.Ct. at 1545.    The "quid pro quo" referred to by the Supreme Court is found in appellees' brief to the Supreme Court in that case:


54
The judge knew, for instance, that the governmental defendants had voluntarily expanded the class of beneficiaries to include not just the designated class of emotionally and mentally handicapped children, but also those subject to the proceedings under the Youth Rehabilitation Act and the Child Protective Act."


55
Appellant's Reply Brief 1, addendum 6 (emphasis added).  This plain language includes those children originally committed to the care of the Department under acts other than the Mental Health Act.  Thus, the Supreme Court based its decision in part on the appellees' representations regarding the scope of the class.


56
Appellees through their motion and the district court through its Clarification Order would have us disregard those representations.  The appellees wish to recharacterize the class so that their obligation, already law as evidenced by the order approving the Settlement Agreement, would be reduced in order to bring them into compliance with the Settlement Agreement.  This they cannot do.  The appellees signed a binding contract agreeing to forgo litigation on the merits and accepted the obligations as listed in the Settlement Agreement.  The waiver of the attorney's fees for the "broad injunctive relief" was a bargained for exchange, and cannot be revoked save for fraud, duress or unconscionability and other contract defenses, none of which are present here.  Miller, 797 F.2d at 733.


57
Furthermore, the district court's interpretation conflicts with the language in the Settlement Agreement.  The Settlement Agreement specifically includes references to minors committed under the Youth Rehabilitation Act.  Only those juveniles who have been charged with a criminal offense and have had jurisdiction waived under the Youth Rehabilitation Act are excluded from the terms of the Settlement Agreement.  There would be no reason to differentiate particular juveniles under the YRA if no juveniles originally brought into the system under the YRA were to be included under the Settlement Agreement.  This would limit the class to very few children and excludes almost all of the named plaintiffs from the class.


58
The negotiations, as represented in correspondence between the parties' counsel, evidence that children who are or will be diagnosed as emotionally or mentally ill and come into the care of the Department are members of the class regardless of how they got into the system.


59
Plaintiffs' counsel continually rejected limitations to only those juveniles committed under the Mental Health Act, but held to his contention that the class was all juveniles, however they came into the custody of the Department, who suffered from emotional or mental illness.  Defendants' counsel, in a letter to plaintiffs' counsel, did not dispute that youths committed under the Youth Rehabilitation Act could be included in the class.  He only objected to inclusion of those youths committed under the Child Protection Act because no named plaintiff had been committed under that Act.  Plaintiffs' counsel's response was that any juvenile, once in the system, who is suffering from emotional or mental illness should receive minimal care.  Any language limitation which defined the class as only those originally committed under the Mental Health Act was continually and specifically rejected by plaintiffs' counsel so the broader language remained.  Plaintiffs' counsel, in fact, deleted language that defendants' counsel drafted to exclude the Youth Services Center from his proposed class definition--thus effecting the inclusion of the Youth Services Center in the definition.


60
Once diagnosed, or brought to one of the facilities designated in the Stipulation for the purpose of diagnosis, that minor comes under the protection of the Settlement Agreement, regardless of how that child came to the attention of the Department of Health and Welfare.


61
4. Minors admitted to a facility other than one for the treatment, detention or housing of youths suffering from emotional or mental illnesses.


62
If a minor is admitted to a facility other than one listed in paragraphs A, B or C in the Stipulation--that is, not a facility for the "treatment, detention or housing" of emotionally or mentally ill youths--he or she is not in the class.  If a minor is in the youth correction center, then any abuse or bad conditions that may be attendant there as a result of a youth detention function are covered under different criteria, and different remedies.  This class action suit covers only those minors who are placed in the custody and care of the Department in institutions that will diagnose, treat and detain youths who are emotionally or mentally ill.  If, however, as we've stated before, a youth comes into the youth correction center, and later is transferred to one of the institutions as described in the Stipulation for diagnosis, custody or care because of mental or emotional illness, then he or she will become part of the class.


63
5. Voluntary admittees.


64
A voluntary and an involuntary commitment under the Mental Health Act requires that the minor admitted first be evaluated and diagnosed and second be found to be suffering from mental or emotional illness before he or she can be brought under the care and custody of the Department for treatment.  See Idaho Code Sec. 66-318, Sec. 66-322, Sec. 66-324, Sec. 66-326, Sec. 66-329 (Mitchie 1989).  If a minor is "voluntarily committed," his or her parents must be notified and the "director of any facility must refuse admission ... whenever[ ] the applicant is not in need of observation, diagnosis, evaluation, care or treatment at the facility."    Idaho Code Sec. 66-318 (Mitchie 1989).  However, juveniles cannot be committed "voluntarily" without being "placed in" these institutions by a parent or guardian.  See id.    Rationally there is no difference in the duty of care between the two--the statutes do not differentiate between the care that is required to be given to involuntarily committed children than those voluntarily committed.  Voluntarily committed children are still subject to the abuse, including sexual abuse by adult patients, and they have the same right under the Idaho Code to demand the care that is given to involuntarily committed children.


65
The district court's interpretation of the phrase "are placed in, or committed to" to exclude those minors voluntarily committed also conflicts with the Settlement Agreement.  The Settlement Agreement differentiates "involuntarily committed" minors in paragraph 4a.  This distinction would have no meaning if the Stipulation precluded those voluntarily committed.  The district court erred in construing "placed in" to be involuntary and "committed to" to mean involuntary--thus reading out the implication that they are separate procedures.  Plaintiffs' counsel in negotiating the Stipulation added the language "placed in or" to cover those children not committed but who voluntarily enter the system.  The plain reading of the Stipulation does not exclude these children.

C. ATTORNEY'S FEES

66
The statutory basis for the attorney fee awards is the Civil Rights Attorney's Fees Awards Act of 1976, 42 U.S.C. Sec. 1988.  The section permits an award of attorney's fees to the "prevailing party."    Several courts have held that in the context of this statute, post-judgment monitoring of a consent degree is a compensable activity for which counsel is entitled to a reasonable fee.  Keith v. Volpe, 833 F.2d 850, 855 (9th Cir.1987).  The Fifth Circuit has awarded attorney's fees under section 1988 for post-judgment monitoring where contempt motions never ripened into courtroom activity.  Id. at 857 (citing Miller v. Carson, 628 F.2d 346, 348 (5th Cir.1980)).  See also Hanrahan v. Hampton, 446 U.S. 754, 757-58, 100 S.Ct. 1987, 1989-90, 64 L.Ed.2d 670 (1980) (court can award attorney's fees to a prevailing party at an interlocutory stage of proceedings).  Also, it is not necessary for plaintiffs to be prevailing parties on every single claim in order to get attorney's fees under 42 U.S.C. Sec. 1988.  Hensley v. Eckerhart, 461 U.S. 424, 428, 103 S.Ct. 1933, 1936-37, 76 L.Ed.2d 40 (1983).  However, the extent of a plaintiff's success is a crucial factor in determining the proper amount of an award of attorney's fees under 42 U.S.C. Sec. 1988.  Where the plaintiff has failed to prevail on a claim that is distinct in all respects from his successful claims, "the hours spent on the unsuccessful claim should be excluded in considering the amount of a reasonable fee."    Id. at 440, 103 S.Ct. at 1943.


67
The standard for making the prevailing party determination has typically been framed as "plaintiffs may be considered 'prevailing parties' for attorney's fees purposes if they succeed on any significant issue in litigation which achieves some of the benefit the party sought in bringing suit."    Id. at 433, 103 S.Ct. at 1939 (quoting Nadeau v. Helgemoe, 581 F.2d 275, 278-79 (1st Cir.1978));  Sethy v. Alameda County Water Dist., 602 F.2d 894, 897-98 (9th Cir.1979) (per curiam), cert. denied, 444 U.S. 1046, 100 S.Ct. 734, 62 L.Ed.2d 731 (1980).


68
Appellants are the prevailing party as to appeal No. 87-4377.  We remanded for a compliance hearing as to the undisputed members of the class, which was exactly the relief the appellants had requested.  As for appeal No. 87-3586, appellants are the prevailing party as to issue 2 (undiagnosed minors), issue 3 (juveniles originally committed under acts other than the Mental Health Act), and issue 5 (voluntary admittees).  Thus, we award attorneys fees to the appellants for appeal No. 87-4377 and award attorneys fees for the time appellants' attorneys spent on the three issues listed above.  The issues in these appeals are separate from the settlement of the underlying litigation and the waiver of attorneys fees in the settlement does not affect our disposition here.

III
CONCLUSION

69
We hold that the district court erred in part of its order of December 31, 1986 interpreting the scope of the class certification.  We affirm the district court's interpretation of the class as set forth in paragraph (1) of its order.  Minors who immediately prior to the admission to a facility designated in paragraphs A, B or C of the Stipulation are residents of a state other than Idaho are not in the class.  We reverse the district court's interpretation of the class as set forth in paragraph (2) of its order.  Minors who have not been diagnosed by the Idaho Department of Health and Welfare as suffering from an emotional or mental illness and who are admitted to the facilities named in paragraphs A, B and C for the purposes of diagnosis are included in the class.  We qualify the district court's interpretation of the class as set forth in paragraph (3) of its order.  Minors who have been committed for reasons other than mental illness, e.g., commitments under the YRA or CPA, are not covered unless they are then transferred or committed into the custody of the Department for diagnosis and care as suffering from emotional or mental illness.  They then become covered by the Settlement Agreement and become part of the class.  We affirm the district court's interpretation of the class as set forth in paragraph (4) of its order, that is, minors admitted to a facility other than one for the treatment, detention or housing of youths suffering from emotional or mental illness, e.g., a youth services center, are not in the class.  We reverse the district court's interpretation of the class as set forth in paragraph (5) of its order and hold that those youths voluntarily committed who otherwise meet the requirements of the Stipulation are included in the class.


70
We remand and order the district court to hold a compliance hearing on the merits of the Settlement Agreement and the scope of the class as interpreted in this opinion.  We retain jurisdiction over any further appeals in this case.  We award attorneys fees and costs to the appellants as to those issues upon which they prevailed.


71
AFFIRMED in part, REVERSED in part, and REMANDED.

