
578 P.2d 462 (1978)
34 Or.App. 231
L & M INVESTMENT CO., by William Leveton, Appellant,
v.
Larry MORRISON and Carol Morrison, Respondents.
Court of Appeals of Oregon.
Decided May 8, 1978.
Argued and Submitted December 22, 1977.
*463 James Scudder, Portland, argued the cause and filed the brief for appellant.
Michael Schumann, Legal Aid Service, Portland, argued the cause for respondents. With him on the brief was Louis D. Savage, Legal Aid Service, Portland.
Before SCHWAB, C.J., and LEE, BUTTLER and JOSEPH, JJ.
BUTTLER, Judge.
This proceeding was commenced under the Forcible Entry and Detainer statutes (ORS 105.105-105.150), but defendants asserted affirmative defenses and counterclaims under the Oregon Residential Landlord and Tenant Act (ORLTA; ORS 91.700-91.895), on the basis of which the trial court, sitting without a jury, determined that plaintiff was not entitled to possession, and that defendants were entitled to continued possession, to damages, and to a mandatory injunction requiring plaintiff to make certain repairs to the premises, and that until such repairs were completed the rental would be reduced from $200 per month to $50 per month.
Plaintiff and defendants entered into a written month-to-month rental agreement with respect to a four-bedroom house for $200 per month. Defendants inspected the premises prior to executing the agreement, but the record indicates that the premises did not comply with the provisions of ORS 91.770 relating to the habitability of a dwelling unit. Defendants took possession on November 26, 1976; on February 1, 1977, defendants tendered a check to plaintiff in the amount of $150, stating that the balance of $50 would be forthcoming. The check was dishonored by the bank upon which it was drawn. On February 15, defendants registered a complaint with the health department stating, among other things, that the toilet on the second floor of the premises leaked contaminated water into the first floor kitchen area. An abatement order was mailed to plaintiff by the health department on February 16, and on February 18 plaintiff sent defendants notice to quit the premises for failure to pay rent. Rent was not paid, and this proceeding was commenced on March 4, 1977.
The trial court found that defendants were entitled to damages in the amount of $400 for "diminished rental value," and $250 for "mental distress,"[1] as a result of which the damages exceeded the rental due; therefore, defendants were not in default in the rental, ORS 91.810,[2] and plaintiff *464 was not entitled to possession of the premises. The trial court also found that plaintiff commenced these proceedings in retaliation against defendants' complaining to the health department, and awarded defendants damages for retaliation, ORS 91.865,[3] in the amount of $400. ORS 91.815.[4] The court further granted defendants a mandatory injunction requiring plaintiff to make numerous specific repairs to the premises to bring them into compliance with the housing code[5] and the habitability requirements of the act,[6] and entered a declaratory judgment in favor of defendants to the effect that the rental value of the premises would be $50 per month "henceforth until the above listed repairs have been completed." The trial court also awarded defendants attorney's fees as the prevailing party.
In this appeal, the only assignment of error that merits consideration is plaintiff's contention that the ORLTA requires written notice from the tenant to the landlord specifying the breach of the rental agreement or statutory provisions before certain remedies are available to the tenant. It cannot be determined from the pleadings, the trial court's findings or the judgment whether defendants rely on ORS 91.800 or 91.805 with respect to damages other than those for retaliation by the landlord. In their brief, however, defendants contend unequivocally that their claim is under ORS *465 91.800(2) because they concede that ORS 91.805 requires written notice from the tenant to the landlord which they do not contend was given here. Defendants also concede that ORS 91.800(1) requires that such written notice be given, but argue that ORS 91.800(2) does not require such notice. ORS 91.800 provides:
"(1)(a) Except as provided in ORS 91.700 to 91.895, if there is a material noncompliance by the landlord with the rental agreement or a noncompliance with ORS 91.770, the tenant may deliver a written notice to the landlord specifying the acts and omissions constituting the breach and that the rental agreement will terminate upon a date not less than 30 days after receipt of the notice if the breach is not remedied in seven days in the case of an essential service or 30 days in all other cases, and the rental agreement shall terminate as provided in the notice subject to paragraphs (b) to (d) of this subsection.
"(b) If the breach is remediable by repairs, the payment of damages or otherwise and if the landlord adequately remedies the breach before the date specified in the notice, the rental agreement shall not terminate by reason of the breach.
"(c) If substantially the same act or omission which constituted a prior noncompliance of which notice was given recurs within six months, the tenant may terminate the rental agreement upon at least 14 days' written notice specifying the breach and the date of termination of the rental agreement.
"(d) The tenant may not terminate for a condition caused by the deliberate or negligent act or omission of the tenant, a member of his family or other person on the premises with his consent.
"(2) Except as provided in ORS 91.700 to 91.895, the tenant may recover damages and obtain injunctive relief for any noncompliance by the landlord with the rental agreement or ORS 91.770.
"(3) The remedy provided in subsection (2) of this section is in addition to any right of the tenant arising under subsection (1) of this section.
"(4) If the rental agreement is terminated, the landlord shall return all security recoverable by the tenant under ORS 91.760 and all prepaid rent."
Defendants' contention seems to be that subsection (2) stands by itself as an independent statutory provision authorizing the recovery of damages and injunctive relief wholly unrelated to subsection (1),[7] or to any other section of the Act.
Each part or section of a statute should be construed with every other part or section so as to produce a harmonious whole. 2A Sutherland, Statutory Construction, § 46.05 (rev 3rd ed 1973); Cal-Roof Wholesale v. Tax Com., 242 Or. 435, 443, 410 P.2d 233 (1966). We must read ORS 91.800 as a whole, and also with reference to other sections of the statutory scheme. The essence of ORS 91.800(1) is that the tenant may give the landlord written notice telling him to cure certain breaches or the tenant will terminate the tenancy. Subsections (2) and (3), when read together with (1), provide, in substance, that in addition to the rights arising under subsection (1), the tenant may recover damages and obtain injunctive relief, if either is appropriate under the circumstances. It appears, therefore, that whether the tenant, after written notice to the landlord, is entitled to terminate the rental agreement or not, he may nevertheless be entitled to damages, or he may be entitled to injunctive relief. However, such relief is only available if the written notice to the landlord has been given as required by subsection (1).
This construction is compelled by construing ORS 91.800 with 91.805, subsection (1) of which relates to deliberate refusal or grossly negligent failure of the landlord to supply any "essential service," for which damages as specified in subsections (1)(a), (b), or (c), and (2) are recoverable. Subsection (3) provides a less severe remedy for *466 negligent failure to supply any essential service. Section (4) of ORS 91.805 provides:
"If the tenant proceeds under this section, he may not proceed under ORS 91.800 as to that breach."
It is difficult to conclude that ORS 91.800(2) is to be construed as an independent provision for remedies when ORS 91.805(4) expressly treats the entire section (91.800) as providing remedies for a given breach, and precludes relief under ORS 91.800 if the tenant proceeds under ORS 91.805. If ORS 91.800(2) were intended to provide independent authority for damages and injunctive relief, it would seem appropriate to allow injunctive relief against the landlord for either a deliberate refusal or a grossly negligent failure to provide any essential service to the tenant. It would also seem appropriate to permit the kind of damages defendants claim are permitted under ORS 91.800(2) in cases where the landlord's conduct is intentional. But the statute clearly circumscribes damages in such cases. ORS 91.805(1)(a), (b), (c) and (2).
Furthermore, if we were to accept defendants' argument, the other sections of the Act relating to damages would be superfluous because ORS 91.800(2) would be all-encompassing with respect to damages for any noncompliance with the rental agreement or with ORS 91.770, requiring the landlord to maintain the premises in a habitable condition. Taken as a whole, the Act clearly indicates that such a construction is not intended.[8]
That being the case, we hold that written notice as provided in ORS 91.800(1) is necessary before any of the remedies provided in ORS 91.800 are available. Accordingly, those parts of the judgment awarding damages to defendants for "diminished rental value" and "mental distress" (both of which defendants claim under ORS 91.800(2)), and granting defendants a mandatory injunction against plaintiff are in error.
Having concluded that defendants were not entitled to damages under ORS 91.800(2), we must consider what effect that holding has on the rest of the judgment. Plaintiff contends that the trial court erred in awarding defendants damages for retaliation under ORS 91.865. While there is sufficient evidence, including the presumption under ORS 91.865(2), to permit the finder of fact to conclude that plaintiff filed this proceeding in retaliation for defendants' complaining to a governmental agency charged with responsibility for enforcement of a building or housing code violation (ORS 91.865(1)(a)), it is conceded that defendants had failed to pay the rent due. Accordingly, under ORS 91.865(3)(b), plaintiff was entitled to bring this action for possession notwithstanding conduct which might otherwise be deemed retaliatory. Defendants rely on ORS 91.810 in contending that if the damages to which they are entitled (excluding those for retaliation) exceed the amount of rental otherwise owing, plaintiff is not entitled to possession *467 and defendants are entitled to damages for retaliation. We agree with defendants' theory, but since we have concluded that defendants were not entitled to damages under ORS 91.800(2), there is nothing to offset against the rental otherwise owing.
It follows that defendants were in default on the rent and that plaintiff is entitled to possession; it also follows that defendants are not entitled to retaliatory damages.[9] It must also follow that plaintiff is a prevailing party, and that defendants are not entitled to attorney's fees under ORS 91.755.
Reversed and remanded.
NOTES
[1]  No question is raised here whether such damages are authorized under ORLTA. But see Ficker v. Diefenbach, 34 Or. App. 241, 578 P.2d 467 (decided this date).
[2]  ORS 91.810 provides:

"(1) In an action for possession based upon nonpayment of the rent or in an action for rent when the tenant is in possession, the tenant may counterclaim for any amount, not in excess of the jurisdictional limits of the court in which the action is brought, that he may recover under the rental agreement or ORS 91.700 to 91.895. Unless the parties otherwise agree, the court shall hear and determine all issues within 15 days after the service of the summons and complaint upon the defendant. In the event the tenant counterclaims, the court from time to time may order the tenant to pay into court all or part of the rent accrued and thereafter accruing, and shall determine the amount due to each party. The party to whom a net amount is owed shall be paid first from the money paid into court, and shall be paid the balance by the other party. The court may at any time release money paid into court to either party if the parties agree or if the court finds such party to be entitled to the sum so released. If no rent remains due after application of this section, judgment shall be entered for the tenant in the action for possession.
"(2) In an action for rent when the tenant is not in possession, he may counterclaim as provided in subsection (1) of this section but is not required to pay any rent into court."
[3]  ORS 91.865 provides:

"(1) Except as provided in this section, a landlord may not retaliate by increasing rent or decreasing services or by bringing or threatening to bring an action for possession after:
"(a) The tenant has complained to a governmental agency charged with responsibility for enforcement of a building or housing code of a violation applicable to the premises materially affecting health and safety;
"(b) The tenant has complained to the landlord of a violation under ORS 91.770; or
"(c) The tenant has organized or become a member of a tenants' union or similar organization.
"(2) If the landlord acts in violation of subsection (1) of this section the tenant is entitled to the remedies provided in ORS 91.815 and has a defense in any retaliatory action against him for possession. In an action by or against the tenant, evidence of a complaint within six months before the alleged act of retaliation creates a disputable presumption that the landlord's conduct was in retaliation. The presumption does not arise if the tenant made the complaint after notice of a proposed rent increase or diminution of services.
"(3) Notwithstanding subsections (1) and (2) of this section, a landlord may bring an action for possession if:
"(a) The violation of the applicable building or housing code was caused primarily by lack of reasonable care by the tenant or other person in his household or upon the premises with his consent;
"(b) The tenant is in default in rent; or
"(c) Compliance with the applicable building or housing code requires alteration, remodeling or demolition which would effectively deprive the tenant of use of the dwelling unit.
"(4) The maintenance of an action under subsection (3) of this section does not release the landlord from liability under subsection (2) of ORS 91.800."
[4]  ORS 91.815 provides:

"If a landlord unlawfully removes or excludes the tenant from the premises or wilfully diminishes services to the tenant by interrupting or causing the interruption of heat, running water, hot water, electric or other essential service, the tenant may recover possession or terminate the rental agreement and, in either case, recover an amount not more than two months' periodic rent or twice the actual damages sustained by him, whichever is greater. If the rental agreement is terminated the landlord shall return all security recoverable under ORS 91.760 and all prepaid rent."
[5]  Unlike the Uniform Residential Landlord and Tenant Act, ORLTA does not tie the habitability requirements to housing and building codes.
[6]  ORS 91.770.
[7]  No question is raised here whether such injunctive relief is available, or if it is, whether it is available where the tenancy is on a month-to-month or week-to-week basis. ORS 91.855.
[8]  The Act, taken as a whole, is ambiguous and appears to contain inconsistencies. The ABA Subcommittee on the Model Landlord-Tenant Act of Committee on Leases, after reviewing the Uniform Act, concluded:

"It is the recommendation of this Subcommittee that the American Bar Association not take any action on the proposed Uniform Residential Landlord and Tenant Act until such time as additional and necessary consideration has been given to remedy the inconsistencies and inadequacies of the present draft. It is not the intention of this Subcommittee to take either the landlord's or tenant's side to the existing argument but merely to acknowledge them. The Commissioners recognize these problems, and they earn our respect when they attempt to deal with them. However, we must caution against any rush to judgment." ABA, Real Property, Probate and Trust Journal, Vol 8, No 1 (1973), at 124.
See also Comment, The Evolution of the Oregon Residential Landlord and Tenant Act, 56 Or.L.Rev. 655 (1977), where the author concludes:
"Rather than providing answers to the unresolved questions on the ORLTA, the legislative history of the Act primarily offers a broad overview of the various factors which motivated the legislature. Both the URLTA and the ORLTA were intended to be somewhat vague, deliberately left for court interpretation. This vagueness is very much the result of political compromise, with an effort to avoid unresolvable issues; the hot potato has been passed to the courts."
[9]  Defendants concede, we think correctly, that they are not entitled to retaliatory damages under ORS 91.865 if they are in default in the payment of rent. It would be self-defeating to provide, as the statute does, that notwithstanding evidence of a retaliatory motive in bringing the action for possession, the landlord may do so if the tenant is in default in rent, but has a defense because of the retaliatory motive and may recover damages to offset against the rent.
