
83 Wn.2d 22 (1973)
515 P.2d 160
RONALD D. FOISY et al., Respondents,
v.
RICHARD KENT WYMAN, Appellant.
No. 42605.
The Supreme Court of Washington, En Banc.
October 25, 1973.
John Gant, for appellant.
Thomas J. Isaac, for respondents.
Edwards E. Merges, amicus curiae.
HUNTER, J.
This is an unlawful detainer action in which the plaintiff (respondent), Ronald D. Foisy, is seeking the possession of his real property, unpaid rent and damages. The defendant (appellant), Richard Kent Wyman, appeals from a judgment in favor of the plaintiff.
In his complaint, the plaintiff alleged in effect: (1) That on December 31, 1970, the defendant took possession of a house which the plaintiff is seeking to recover, pursuant to a 6-month lease requiring $300 to be paid for said term, plus water and other utility charges; (2) that during the term of the lease the defendant paid the sum of $95, leaving $205 still owing for the 6-month period; (3) that the defendant remained upon the premises after the expiration of the lease; (4) that the rental payment after the expiration of the lease was to be $75 per month; (5) that after the defendant refused to pay the accrued rent, the plaintiff served a 3-day notice to pay rent or vacate upon the defendant on August 27, 1971; (6) that the defendant failed to pay any of the amounts owing after the 3-day notice was served upon him.
The defendant's answer raised several affirmative defenses including breach of implied warranty of habitability.
During trial the defendant testified that he took possession of the house on March 3, 1971. It appears that the *24 parties executed the lease in question on March 8, 1971, although the lease was dated December 31, 1970, and was to cover a term of 6 months, which was to commence on January 1, 1971, and end on June 30, 1971.
The lease in question also contained an option to purchase. The testimony of the defendant indicates that he thought he was purchasing the house rather than renting it. His testimony also indicates that the house contained a number of defects when he entered into the lease and it indicates that he was aware of some of the defects when he agreed to rent the house, but not all of them.
The trial court concluded that the defendant was guilty of unlawful detainer of the premises rented to him by the plaintiff. However, it refused to enforce the provisions of what it termed the "purported lease." It found that the reasonable rental for the period of occupancy of the premises was the sum of $50 per month commencing with March 3, 1971, until such time as the defendant removed himself. In effect, the court held the lease was invalid. The court also held that a writ of restitution should issue to the sheriff to require the surrender of possession if the defendant did not voluntarily withdraw and that damages for the period March 3, 1971, through April 3, 1972, were to be doubled if the defendant did not surrender the premises by April 3, 1972. The defendant appeals, although the plaintiff does not cross-appeal from the court's findings.
The primary contention raised by the defendant is that the trial court erred in refusing to accept evidence as to his affirmative defense of breach of implied warranty of habitability. The defendant argues that the plaintiff's failure to maintain the premises in a habitable condition constitutes a failure of consideration upon the part of the plaintiff and relieves the defendant of his obligation to pay rent. We agree that the tenant should have been permitted to introduce evidence at trial in support of this theory of defense.
The premises in question, according to the testimony of the defendant, contained a number of defects including a lack of heat, no hot water tank, broken windows, a broken *25 door, water running through the bedroom, an improperly seated and leaking toilet, a leaking sink in the bathroom, broken water pipes in the yard and termites in the basement. No objection was made to the introduction of this testimony. The testimony of the defendant also indicates that he painted the interior and made repairs upon the premises, but ceased making repairs when he learned of a municipal court action being initiated against the plaintiff as a result of numerous housing code violations within the house. In addition, the record reveals that the landlord was informed of the defects and was prosecuted successfully for violations of the Seattle housing code.
During the trial the defendant attempted to introduce the testimony of two housing inspectors as to the housing code violations which existed on the premises. The trial court sustained the plaintiff's objections to this testimony upon the theory that the condition of the premises was not relevant to the issue before the court. We disagree with the reasoning of the trial court in refusing to accept the evidence as to the condition of the premises, although it should be stated that this issue has not been heretofore specifically addressed in this jurisdiction in relation to our unlawful detainer statutes.
Throughout the United States, the old rule of caveat emptor in the leasing of premises has been undergoing judicial scrutiny.
In Pines v. Perssion, 14 Wis.2d 590, 596, 111 N.W.2d 409 (1961), the court stated:
To follow the old rule of no implied warranty of habitability in leases would, in our opinion, be inconsistent with the current legislative policy concerning housing standards. The need and social desirability of adequate housing for people in this era of rapid population increases is too important to be rebuffed by that obnoxious legal cliche, caveat emptor. Permitting landlords to rent "tumble-down" houses is at least a contributing cause of such problems as urban blight, juvenile delinquency, and high property taxes for conscientious landowners.
See Reste Realty Corp. v. Cooper, 53 N.J. 444, 251 A.2d 268 *26 (1969); Marini v. Ireland, 56 N.J. 130, 265 A.2d 526 (1970); Lemle v. Breeden, 51 Hawaii 426, 462 P.2d 470 (1969); Javins v. First Nat'l Realty Corp., 428 F.2d 1071 (D.C. Cir.1970), cert. denied, 400 U.S. 925, 27 L.Ed.2d 185, 91 S.Ct. 186 (1970), and Jack Spring, Inc. v. Little, 50 Ill.2d 351, 280 N.E.2d 208 (1972).
In Lemle v. Breeden, supra, the court reviewed the rule of caveat emptor and the current trend toward finding an implied warranty of habitability in leases, and stated on page 433:
The application of an implied warranty of habitability in leases gives recognition to the changes in leasing transactions today. It affirms the fact that a lease is, in essence, a sale as well as a transfer of an estate in land and is, more importantly, a contractual relationship. From that contractual relationship an implied warranty of habitability and fitness for the purposes intended is a just and necessary implication. It is a doctrine which has its counterparts in the law of sales and torts and one which when candidly countenanced is impelled by the nature of the transaction and contemporary housing realities. Legal fictions and artificial exceptions to wooden rules of property law aside, we hold that in the lease of a dwelling house, such as in this case, there is an implied warranty of habitability and fitness for the use intended.
(Footnote omitted.)
In Javins v. First Nat'l Realty Corp., supra, the court analyzed the various exceptions to the common-law rule that the lessor has no duty to repair and stated on page 1078:
These as well as other similar cases demonstrate that some courts began some time ago to question the common law's assumptions that the land was the most important feature of a leasehold and that the tenant could feasibly make any necessary repairs himself. Where those assumptions no longer reflect contemporary housing patterns, the courts have created exceptions to the general rule that landlords have no duty to keep their premises in repair.
It is overdue for courts to admit that these assumptions are no longer true with regard to all urban housing. *27 Today's urban tenants, the vast majority of whom live in multiple dwelling houses, are interested, not in the land, but solely in "a house suitable for occupation." Furthermore, today's city dweller usually has a single, specialized skill unrelated to maintenance work; he is unable to make repairs like the "jack-of-all-trades" farmer who was the common law's model of the lessee. Further, unlike his agrarian predecessor who often remained on one piece of land for his entire life, urban tenants today are more mobile than ever before. A tenant's tenure in a specific apartment will often not be sufficient to justify efforts at repairs. In addition, the increasing complexity of today's dwellings renders them much more difficult to repair than the structures of earlier times. In a multiple dwelling repair may require access to equipment and areas in the control of the landlord. Low and middle income tenants, even if they were interested in making repairs, would be unable to obtain any financing for major repairs since they have no long-term interest in the property.
(Footnotes omitted.)
[1, 2] We find the reasoning of these cases extremely persuasive. Any realistic analysis of the lessor-lessee or landlord-tenant situation leads to the conclusion that the tenant's promise to pay rent is in exchange for the landlord's promise to provide a livable dwelling. As Judge Skelly Wright stated in the Javins case on page 1074:
When American city dwellers, both rich and poor, seek "shelter" today, they seek a well known package of goods and services  a package which includes not merely walls and ceilings, but also adequate heat, light and ventilation, serviceable plumbing facilities, secure windows and doors, proper sanitation, and proper maintenance.
(Footnote omitted.) Javins v. First Nat'l Realty Corp., 428 F.2d 1071 (D.C. Cir.1970), cert. denied, 400 U.S. 925, 27 L.Ed.2d 185, 91 S.Ct. 186 (1970). The value of the lease today then, whether it is oral or written, is that it gives the tenant a place to live, and he expects not just space but a dwelling that protects him from the elements of the environment without subjecting him to health hazards.
In House v. Thornton, 76 Wn.2d 428, 457 P.2d 199 (1969), *28 we rejected the doctrine of caveat emptor as it applied to the sale of a new residence and found an implied warranty that the structure is fit for the buyer's intended purpose. In doing so, we noted that the old rule of caveat emptor has little relevance to the sale of a brand-new house by a vendor-builder to a first buyer for the purposes of occupancy. By analogy, the old rule of caveat emptor has little relevance to the renting of premises in our society. There can be little justification for following a rule that was developed for an agrarian society and has failed to keep pace with modern day realities. We therefore hold that in all contracts for the renting of premises, oral or written, there is an implied warranty of habitability and breach of this warranty constitutes a defense in an unlawful detainer action. See Javins v. First Nat'l Realty Corp., supra; Lund v. MacArthur, 51 Hawaii 473, 462 P.2d 482 (1969); Marini v. Ireland, 56 N.J. 130, 265 A.2d 526 (1970); Jack Spring, Inc. v. Little, 50 Ill.2d 351, 280 N.E.2d 208 (1972).
It can be argued, however, that the defendant should not be entitled to the protection of an implied warranty of habitability since he knew of a substantial number of defects when he rented the premises and the rent was reduced from $87 per month to $50 per month. We believe this type of bargaining by the landlord with the tenant is contrary to public policy and the purpose of the doctrine of implied warranty of habitability. A disadvantaged tenant should not be placed in a position of agreeing to live in an uninhabitable premises. Housing conditions, such as the record indicates exist in the instant case, are a health hazard, not only to the individual tenant, but to the community which is exposed to said individual. As the court recognized in Pines v. Perssion, supra, such housing conditions are at least a contributing cause of such problems as urban blight, juvenile delinquency and high property taxes for the conscientious landowners.
Our belief that public policy demands such a result is reinforced by our review of Laws of 1973, 1st Ex. Sess., ch. 207, which became effective July 16, 1973. The legislature *29 in passing this bill and the Governor in signing it have recognized that public policy demands this result. Laws of 1973, 1st Ex. Sess., ch. 207, provides in part:
Sec. 6. The landlord will at all times during the tenancy keep the premises fit for human habitation, and shall in particular:
(1) Maintain the premises to substantially comply with any applicable code, statute, ordinance, or regulation governing their maintenance or operation, which the legislative body enacting the applicable code, statute, ordinance or regulation could enforce as to the premises rented;
(2) Maintain the roofs, floors, walls, chimneys, fireplaces, foundations, and all other structural components in reasonably good repair so as to be usable and capable of resisting any and all normal forces and loads to which they may be subjected;
...
(5) Except where the condition is attributable to normal wear and tear, make repairs and arrangements necessary to put and keep the premises in as good condition as it by law or rental agreement should have been, at the commencement of the tenancy;
...
(7) Maintain all electrical, plumbing, heating, and other facilities and appliances supplied by him in reasonably good working order;
(8) Maintain the dwelling unit in reasonably weathertight condition;
...
(10) Except where the building is not equipped for the purpose, provide facilities adequate to supply heat and water and hot water as reasonably required by the tenant;
...
Sec. 8. The tenant shall be current in the payment of rent before exercising any of the remedies accorded him under the provisions of this chapter: PROVIDED, That this section shall not be construed as limiting the tenant's civil remedies for negligent or intentional damages: PROVIDED FURTHER, That this section shall not be construed as limiting the tenant's right in an unlawful detainer proceeding *30 to raise the defense that there is no rent due and owing.
...
Sec. 10....
...
(6) Nothing in this section shall prevent the tenant from agreeing with the landlord to undertake the repairs himself in return for cash payment or a reasonable reduction in rent, the agreement thereof to be agreed upon between the parties, and such agreement does not alter the landlord's obligations under this chapter.
It may also be argued that the defendant should not be afforded the protection of the doctrine of implied warranty of habitability since the defendant signed a lease which contained an option to purchase. However, as heretofore stated, the trial court failed to recognize the validity of the lease. There is no cross-appeal from this determination and we are therefore bound by the trial court's decision.
The plaintiff argues that the trial court was correct in disregarding the Seattle housing code as it was improperly pleaded and no properly authenticated copy of the housing code was offered. These issues were not before the court when it rejected the testimony of the housing inspectors. It was not until after the court had rejected the testimony of the housing inspectors on the basis of their testimony being irrelevant that the housing code was offered into evidence. Had the court rejected the housing code on the grounds suggested by the plaintiff, the defendant would have been in a position to move to amend his pleadings. The argument as to the housing code not being properly authenticated, we believe, is without merit in view of RCW 5.44.080 which states:
When the ordinances of any city or town are printed by authority of such municipal corporation, the printed copies thereof shall be received as prima facie evidence that such ordinances as printed and published were duly passed.
The copy of the housing code that was offered into evidence by the defendant is printed by authority of the City *31 of Seattle and is therefore prima facie evidence that the ordinances as printed and published were duly passed.
[3] The testimony relating to the housing code violations should have been admitted into evidence, and the trial court erred in ruling that the condition of the premises was not relevant to the issue of rent due and owing. While the housing code violations in and of themselves do not establish a prima facie case that the premises are uninhabitable, they are evidence which aids in establishing that the premises are uninhabitable.[1]
The plaintiff argues, in effect, however, that the unlawful detainer statutes are not designed for defenses such as breach of implied warranty of habitability due to the nature of the action. In light of our previous discussion, we believe this to be without merit.
One of the basic issues in an unlawful detainer action of this nature is whether or not there is any rent due. RCW 59.12.170, which governs the entry of judgment and execution in an unlawful detainer action, states that upon a finding of default in the payment of rent, "the judgment shall also declare the forfeiture of the lease, agreement or tenancy." RCW 59.12.030 provides:
A tenant of real property for a term less than life is guilty of unlawful detainer either:
...
(3) When he continues in possession in person or by subtenant after a default in the payment of rent, and after notice in writing requiring in the alternative the payment of the rent or the surrender of the detained premises ...
Since the affirmative defense of breach of implied warranty of habitability goes directly to the issue of rent due *32 and owing, which is one of the basic issues in an unlawful detainer action as the above statutes indicate, we now hold said defense is available in an unlawful detainer action of this nature. See Jack Spring, Inc. v. Little, 50 Ill.2d 351, 280 N.E.2d 208 (1972).
[4] The defendant also contends that the trial court erred in rendering judgment in the instant case, since the amount demanded in the 3-day notice was more than the trial court found was actually due and owing. We disagree.
In Provident Mut. Life Ins. Co. v. Thrower, 155 Wash. 613, 617, 285 P. 654 (1930), we stated:
As to the form and contents of the notice or demand, a substantial compliance with the statute is sufficient.
See Sowers v. Lewis, 49 Wn.2d 891, 307 P.2d 1064 (1957). See also Erz v. Reese, 157 Wash. 32, 288 P. 255 (1930) (wherein we stated on page 35 that "we have never adopted the strictest rule of construction as to the form or contents of such notices under our unlawful detainer statutes, chiefly for the reason, doubtless, that the statutes prescribe no form."). In the Provident Mutual case the notice was defective in three respects: (1) It contained the signature of the agent rather than the owner; (2) it overstated the amount of rent due by $165 as found by the trial court; and (3) it defectively described the premises. Although we did not specifically address the issue of the overstatement of the amount of rent due, we did hold the notice substantially complied with the requirements of Rem. Comp. Stat. § 812 (now RCW 59.12.030).
In the instant case, the 3-day notice to pay rent or vacate the premises that was served upon the defendant called for the payment of $205, the balance due under the lease, plus $75 per month for July and August. There was no dispute as to the monthly rental payment under the terms of the purported lease; however, there was a conflict as to the amount of the monthly rental due for the months of July and August. The plaintiff testified the rent for those months was to be $75 per month, and the defendant testified that it *33 was to be $50 per month. It appears that the plaintiff's demand for rental in the notice was in conformity with his good faith determination as to the amount of rental due, and that the defendant was not prejudiced as he could have tendered to the plaintiff the amount of rental due according to his understanding of the agreement. See C.J. Peck, Landlord and Tenant Notices, 31 Wash. L. Rev. 51, 61 (1956). In tendering the amount due to the plaintiff, of course, he would deduct that amount due which he believed he was relieved from paying due to the landlord's breach of his implied warranty of habitability.
We believe that under the above facts, the plaintiff's demand for rental was in substantial compliance with the statute and the fact that there was a dispute as to the amount of rent due, which was later determined contrary to the plaintiff, should not invalidate the unlawful detainer proceeding.
The defendant also contends that the portion of RCW 59.12.170, which authorizes the doubling of damages, is unconstitutional as it is in violation of the due process and equal protection clauses of the fourteenth amendment to the United States Constitution.
[5] We need not reach this issue in light of the passage of the "Residential Landlord-Tenant Act of 1973" (Laws of 1973, 1st Ex. Sess., ch. 207), which eliminated the mandatory double damage provision from the law.
Where substantial legislative or decisional changes in the applicable statutory provisions have been made, thereby precluding the imposition of the challenged provision, the constitutional issue need not be resolved. Grays Harbor Paper Co. v. Grays Harbor County, 74 Wn.2d 70, 442 P.2d 967 (1968); State School Directors Ass'n v. Department of Labor & Indus., 82 Wn.2d 367, 510 P.2d 818 (1973). See also State v. Vidal, 82 Wn.2d 74, 508 P.2d 158 (1973); State v. Baker, 81 Wn.2d 281, 501 P.2d 284 (1972).
As we stated in Sorenson v. Bellingham, 80 Wn.2d 547, 558, 496 P.2d 512 (1972):
It is a general rule that, where only moot questions or *34 abstract propositions are involved, or where the substantial questions involved in the trial court no longer exist, the appeal, or writ of error, should be dismissed. There is an exception to the above stated proposition. The Supreme Court may, in its discretion, retain and decide an appeal which has otherwise become moot when it can be said that matters of continuing and substantial public interest are involved.... This exception to the general rule obtains only where the real merits of the controversy are unsettled and a continuing question of great public importance exists.
(Citations omitted.)
Given the passage of the new landlord-tenant act and the absence of any actual trial court imposition of double damages in the instant case, the exception to the above rule is not in force and we therefore need not comment further upon this issue.
[6] For the guidance of the trial court at the new trial to which the defendant is entitled, the finder of fact must make two findings where the defendant claims the landlord has breached his implied warranty of habitability: (1) Whether the evidence indicates that the premises were totally or partially uninhabitable during the period of habitation and, if so, (2) what portion, if any or all, of the defendant's obligation to pay rent is relieved by the landlord's total or partial breach of his implied warranty of habitability. If the finder of fact determines that the entire rental obligation is extinguished by the landlord's total breach, then the action for unlawful detainer based on nonpayment of rent must fail. If, on the other hand, the court determines that the premises are partially habitable, and the tenant failed to tender to the plaintiff a sufficient amount to pay rent due for the partially habitable premises, then judgment shall be entered in accordance with RCW 59.12.170.
The judgment of the trial court is reversed and the case is remanded for a new trial consistent with this opinion.
HALE, C.J., and ROSELLINI, HAMILTON, STAFFORD, and UTTER, JJ., concur.
*35 BRACHTENBACH, J. (dissenting)
Ignoring the defendant's own testimony, the majority casts this dispute into a traditional landlord-tenant battle and from that relationship creates an implied warranty of habitability. That creation might well be a desirable change in Washington law, but this simply is not the case in which it should be implemented.
The majority's application of such a warranty to the defects presented in this case and even its characterization of the defendant as a mere "tenant" are unsound in light of the defendant's testimony, elicited by his own counsel:
Q. And what was the agreement between you and the Foiseys [sic] relating to the purchase of that house? A. The agreement was that I was to pay $50 a month to buy the house ... Q. So, it was your understanding that the agreement was that you were to buy the house for $50 a month? A. That was my understanding ... Q. At the time you moved in, were there defects on the premises? A. All kinds but I tried my best to bring them up to some remedy of standard ... Q. What was your understanding as to what you had to do to exercise the option? A. My understanding was to clean the house up and fix it up to some degree. Q. So, in other words, you thought that  A. Take care of it like a regular home owner. I figure it was mine and I was going to try to do the best I could but I run into all kinds of difficulty with the permit ... Q. So, it was your understanding that you were purchasing the house and that is your only obligation to pay $50 a month? A. That was the whole understanding at the conception of the deal because her mother told me [objection]. Q. So, the only time prior to March you were on the premises was to just look at it? A. Right. I told them I would buy and they said fine. They put me in it for $50 a month. Q. Had you done any work cleaning up the house or anything around the premises before you moved in on [sic] March? A. Oh, yes, I had to. Q. Before you moved in? A. Right, I had to. In the basement there was termites and there was things. Q. When were you doing those things? A. In February . .. Q. At that time did you have any agreement with the Foiseys [sic] as to whether or not you were going to purchase it? A. I had the agreement before I walked in *36 that house. That's when they told me you can have it for $50 a month. They wanted $87 a month. I said it isn't worth it because it's sitting still and the windows are out. [Interruption.] Q. That understanding was that you were going to pay $50 per month? A. Correct. That is the only way I would walk in that house because I wasn't in the proper position to bargain. They bargained to me because I saw a deal and I grabbed it ... Q. As far as you were concerned, you never received any word that you were anything but a purchaser, is that right? A. To my knowledge, that was the only way I would have gone into that house as a purchaser. What would I want to rent it for I had a house of my own.
From that testimony it is perfectly clear that the defendant was fully aware of the defects and deficiencies in the premises. Those defects and deficiencies were the very reason he was willing and able to negotiate lower payments.
It requires no authority to sustain the proposition that a person who takes possession of premises with known defects, intends to repair those defects, bargains for reduced monthly payments and characterizes the transaction as a "deal" which he "grabbed," neither deserves nor needs the protection of an implied warranty of habitability.
The fact of the matter, apparent from the record, is that the defendant encountered difficulties with his continued, anticipated repairs when the housing code violations pending against the plaintiffs came to light. That situation might give rise to other remedies, but they are not asserted here.
But apart from the foregoing, and even if the defendant is to be characterized as a tenant in the strict legal sense of that word, the majority fails to recognize that the Seattle housing code was not properly before the trial court.
In his answer, affirmative defense and counterclaim, the defendant alleged violations of the provisions of the housing, building, fire, health and sanitation codes of the City of Seattle. Such shotgun pleading is a clear violation of CR 9 (i). At the time of trial, absolutely no proof of the housing code was provided, except to offer an unauthenticated, unidentified booklet entitled "Housing Code, City of Seattle." *37 The trial court, on that ground alone, correctly rejected testimony about violations of a city ordinance which had not been properly pleaded, properly authenticated or properly identified.
The trial court should be affirmed.
WRIGHT, J., concurs with BRACHTENBACH, J.
RYAN, J.[*] (concurring in the result of the dissent)
However desirable the majority's endorsement of the doctrine of implied warranty of habitability may be, this is not a proper case for its application.
I would, therefore, concur in the result of the dissent.
Petition for rehearing denied December 12, 1973.
NOTES
[1]  Evidence of one or two minor infractions of a housing code which do not affect habitability are inconsequential and would not entitle the tenant to a reduction in rent. Also, the tenant's defense does not depend on official inspection or official finding of violations of a city housing code. Javins v. First Nat'l Realty Corp., 428 F.2d 1071 (D.C. Cir.1970), cert. denied, 400 U.S. 925, 27 L.Ed.2d 185, 91 S.Ct. 186 (1970); Diamond Housing Corp. v. Robinson, 257 A.2d 492 (D.C. Cir.1969).
[*]  Justice Ryan is serving as a justice pro tempore of the Supreme Court pursuant to Const. art. 4, § 2(a) (amendment 38).
