McGraw, Justice:
This proceeding is before us on certified question. Pursuant to W.Ya. Code § 58-5-2, the Circuit Court of Logan County, West Virginia, certified to this Court the [369]*369following questions of law upon the joint motion of the plaintiffs and defendant, after first denying plaintiffs’ motions for “partial summary judgment and judgment on the pleadings”:
1. Whether failure of a landlord to maintain rental premises in a habitable condition and otherwise remedy defects to the premises which render the residence uninhabitable is in violation of a landlord’s implied warranty of habitability to a tenant? And if so, whether it is subject to waiver?
2. Whether a landlord’s warranty of habitability and the tenant’s covenant to pay rent are mutually dependent?
3. Whether failure of a landlord to maintain the premises in habitable condition constitutes a failure of consideration and a breach of the rental agreement?
4. Whether a landlord’s breach allows to the tenant one or more of the following remedies: (a) a right of action or setoff for the difference between the agreed rent and the fair rental value of the premises in their defective condition; (b) after reasonable notice and opportunity to a landlord to correct the defective conditions, to repair the defects himself and deduct the repair cost from the rent; and (c) vacation of the premises terminating a tenant’s obligation to pay rent? (d) what damages, if any, are recoverable by the landlord or tenant in the event of breach by either party.
5. Whether a breach of the implied warranty of habitability is a defense to a landlord’s action for rent, damages, or unlawful detainer?'
I
At common law, a lease for real estate was considered a conveyance or sale of an estate in land for a term. 2 R. Powell, The Law of Real Property § 221(1) (Rohan ed. (1977). A burden of inspection was placed upon the tenant and “[f|raud apart, there [was] no law against let[370]*370ting a tumble-down house.” Robbins v. Jones, 15 C.B.N.S. 221, 240, 143 Eng. Rep. 768, 776 (1863).1 The only way that a tenant at common law could assure the fitness of a leasehold was by exacting an express covenant from the landlord that the property was to be fit for the purpose intended. Cowan v. One Hour Valet, Inc., 151 W. Va. 941, 157 S.E.2d 843 (1967); Lennox v. White, 133 W. Va. 1, 54 S.E.2d 8 (1949); Redden v. McCreery, 123 W.Va. 367, 15 S.E.2d 150 (1941); Charlow v. Blankenship, 80 W. Va. 200, 92 S.E. 318 (1917); Kline v. McLain, 33 W.Va. 32, 10 S.E. 11 (1889); Arbenz v. Exley, 52 W.Va. 476, 44 S.E. 149 (1903). Absent a statute to the contrary, it was uniformly held that there was no implied warranty of habitability or fitness for the purpose leased. Clifton v. Montague, 40 W. Va. 207, 21 S.E. 858 (1895); see Wilkinson v. Searls, 155 W. Va. 475, 184 S.E.2d 735 (1971); 1 American Law of Property § 3.45 (Casner ed. 1952); 2 R. Powell, The Law of Real Property § 225 (Rohan ed. 1977); 3 Holdsworth, A History of English Law, 122-23 (5th ed. 1966). “The common law focused on possessions rather than service. The ideal landlord delivered possession, then did nothing more; the ideal tenant paid his rent and demanded nothing more than possession.” Note, 56 Cornell L. Rev. 489, 490 (1971).
The acceptance of such rules in this state, as well as in most American common law jurisdiction, is exemplified by syllabus point 1 of Charlow v. Blankenship, supra, which provides:
There is no implied covenant upon the part of the landlord in a lease that the premises are tenantable or reasonably suitable for occupation. In the absence of fraud or concealment by the lessor of the condition of the property at the date of the lease, the rule of caveat emptor applies.
[371]*371These rules developed out of an agrarian economy beginning in the Middle Ages at a time when the land, not the simple buildings and fixtures, was the focal point of the transaction. The right to possession of the land was the chief element of the exchange. The rent was deemed to issue from the land itself “without reference to the condition of the buildings or structures upon it.” Hart v. Windsor, 12 M & W 68, 81, 52 Eng. Rep. 1114, 1119 (1843). Thus, the rent was due even if the buildings were not habitable or fit for occupancy.2 2 F. Pollock & F. Mait-land, The History of English Law 131 (2d ed. 1923). This strict application of caveat emptor was consistent with the agrarian social setting under which the leasehold interests were created. It was accepted that the small, simple structures affixed to realty would be repaired by the farmer-tenant.3 The condition of such premises normally was as readily apparent to the prospective tenant as it was to the landlord. Latent defects were not likely, to exist due to the lack of the complicated, often imper[372]*372ceptible, modern refinements that characterize residential structures today. See the excellent historical discussion in Green v. Superior Court, 10 Cal. 3d 616, 517 P.2d 1168, 111 Cal. Rptr. 704 (1974) (en banc).
But as society evolved, so did the setting under which the common law landlord-tenant relationship existed. English and American courts began to relax somewhat the settled common law rules.4 The courts, recognizing that some tenants primarily seek living quarters and not land, implied a warranty of habitability into short-term leases of furnished dwellings. Smith v. Marrable, 11 M. & W. 5, 152 Eng. Rep. 693 (Ex. 1843); Ingalls v. Hobbs, 156 Mass. 348, 31 N.E. 286 (1892);5 Young v. Povich, 121 Me. 141, 116 A. 26 (1922); Pines v. Perssion, 14 Wis.2d 590, 111 N.W.2d 409 (1961). Where the lease was for an apartment or room that later was totally destroyed by [373]*373fire, the courts discharged the tenant from future rent, again recognizing that the tenant’s true object in such cases was not land, but a place to live. Graves v. Berdan, 26 N.Y. 498 (1863); see Arbenz v. Exley, 52 W.Va. 476, 44 S.E. 149 (1903) & W.Va. Code § 37-6-28. And where a lease, restricting the lessee to a particular use, was accepted before the premises were completely constructed or altered, the courts made an exception to the no-implied warranty rule. See, e.g., Woolford v. Electric Appliances Co., 24 Cal. App. 2d 385, 75 P. 2d 112 (1938); J. D. Young Corp. v. McClintic, 26 S.W.2d 460 (Tex. Civ. App. 1930), rev’s on other grounds, 66 S.W.2d 676 (Texas Comm’n App. 1933); Hardman Estate v. McNair, 61 Wash. 74, 111 P. 1059 (1910). A further historical adjustment to the no-repair rule occurred when the establishment of “a well recognized exception," Weaver Mercantile Co. v. Thurmond, 68 W. Va. 530, 70 S.E. 126 (1911), concerning premises used in common or remaining under the landlord’s control. Charlow v. Blankenship, supra. “[T]he law imposes on a landlord the duty to exercise ordinary care to maintain in reasonably safe condition, premises owned by him and used in common by different tenants ... the duty arises from the tenancy ...” syl. pt. 1, Marsh v. Riley, 118 W.Va. 52, 188 S.E. 748 (1936); accord, Lennox v. White, 133 W. Va. 1, 54 S.E. 2d 8 (1949); syl. pt. 2, Barker v. Withers, 141 W. Va. 713, 92 S.E.2d 705 (1956).
At common law the lease was a conveyance of possession of real property for a term. The covenants in a lease were deemed to be independent, not dependent. Thus the duty of a tenant in possession to pay rent was accepted as essentially absolute. See, e.g., King v. Moorehead, 495 S.W.2d 65 (Mo. Ct. App. 1973). But the courts implied into leases a “covenant of quiet enjoyment” to relieve a tenant from the obligation to pay rent when he was deprived of possession or disturbed by hostile claimants or defects in title. Under this doctrine, the landlord, through his acts or omissions, was deemed to “evict” the tenant by depriving him of the beneficial enjoyment of the demised premises. Dyett v. Pendleton, 8 Cow. 727 (N.Y. 1826); Edgerton v. Page, 20 N.Y. 281 (1859); see [374]*374Wilkinson v. Searls, 155 W.Va. 475, 184 S.E.2d 735 (1971). Thus a tenant compelled to vacate any or all of an unfit and uninhabitable dwelling was deemed to be constructively “evicted” under law and was relieved from further rent liability.6 This doctrine of constructive eviction was created by the courts to serve as a “substitute for the dependency of covenants in a large class of cases ...” Lemle v. Breeden, 462 P.2d 470 (Hawaii 1969) quoting Lesar, Landlords and Tenant Reforms, 35 N.Y.U. L. Rev. 1279, 1282 (1960). See also King v. Moorehead, 495 S.W.2d 65, 69-70 (Mo. 1973); 1 American Law of Property § 3.50 at 278 (Casner ed. 1952). “This rule allowed the court to mitigate some of the injustices stemming from strict application of the independent covenants rule without repudiating the rule’s basic premise that the lease was essentially a conveyance of a possessory interest in land for a term and not a contract for a dwelling suitable for human occupation.” Boston Housing Authority v. Hemingway, 363 Mass. 184, 189-90, 293 N.E.2d 831, 837 (1973).
Certified Question No. 4(c) asks whether the landlord’s failure to maintain the premises in a fit and habitable condition would allow the tenant to vacate the premises thereby terminating the obligation to pay rent. Constructive eviction, recognized in Wilkinson v. Searls, supra, would afford the tenant that remedy.
[375]*375Since W. Va. Const, art. 8, § 21 and such cases as Cunningham v. County Court, 148 W.Va. 303, 308, 134 S.E.2d 725, (1964) hold that drastic changes in the common law can be made only by the Legislature, we must next review those relevant changes that have been effectuated by statute.
In W.Va. Code § 29-3-2 the Legislature declared and found that “a significant part of the population of this State needs improved fire prevention and control ...” and that “adequate fire prevention and control are not likely to become a reality unless certain administrative functions and procedures are enacted by law....” A State Fire Commission was created, W.Va. Code § 29-3-3, and was granted the power to “promulgate, amend and repeal regulations for the safeguarding of life and property from the hazards of fire and explosion ...” which regulations “shall have the force and effect of law” statewide. W.Va. Code § 29-3-5. W.Va. Code § 29-3-12(c) provides that the State Fire Marshal shall enforce these regulations.
We take judicial notice that these regulations, in June, 1976, were filed in the office of the Secretary of State and that the State Fire Commissioner therein adopted, as its regulations, the National Fire Code published by the National Fire Protection Association, the National Building Code, and promulgated itself certain additional regulations covering topics such as explosives, liquified petroleum gases, schools, high rise buildings, fire alarms, sprinklers and delapidated buildings.
These voluminous and detailed regulations, which fill eighteen separate volumes and thousands of pages, deal with such things as electricity, heating, plumbing, roofing, building materials, lights, ventilation, stairways, doors, basements, chimneys and walls. Section 2.02 provides that, “No person shall occupy or use, or permit the occupation or use of a building or structure or any part thereof which has been erected or altered in violation of the provisions of these regulations.” This prohibition appears with equal force in Code 29-3-14(a) as follows:
[376]*376No person shall erect, construct, reconstruct, alter, maintain or use any building, structure or equipment or use any land in such a way to endanger life or property from the hazards of fire or explosion, or in violation of any regulation, or any provision or any change thereof promulgated by the state fire commission under the authority of this article.
Our Legislature in W.Va. Code § 16-1-7 gave the State Board of Health
“The power to promulgate such rules and regulations ... as are necessary and proper to effectuate the purposes of [chapter 16] and prevent the circumvention and evasion thereof ... Such rules and regulations shall include, but not be limited to, the regulation of ... the sanitary conditions of ... sources of water supply, sewerage facilities and plumbing systems ... and the design of all water systems, plumbing systems [and] sewerage systems.”
Pursuant to this, effective February 1, 1975, the West Virginia State Board of Health adopted the following regulations:
“3.1 ... [E]very dwelling or establishment whether publicly or privately owned where persons reside, assemble, or are employed, shall be provided with toilet facilities and a sanitary system of sewage or excreta disposal.
2.5 Dwelling [definition] — A building structure or place used or intended to be used for human occupancy as a single family or multi-family residence.
2.19 Sewage [definition] — Any liquid waste containing animal, vegetable and/or mineral matter in suspension or solution including, but not limited to, waste from water closets, urinals, lavatories, bathtubs, laundry tubs, washing machines, drinking fountains, sinks, kitchen equipment and other sanitary fixtures or facilities.”
[377]*377W.Va. Code § 8-12-13 grants to municipalities the plenary power to regulate the plumbing, wiring, erection, construction, repair, and alteration of structures. In W.Va. Code § 8-12-16 municipalities are granted the plenary power and authority “to adopt ordinances regulating the repair, alteration or improvement, of the vacating, and closing or removal or demolition, or any combination thereof, of any dwelling or other buildings unfit for human habitation ...”
On March 6, 1978, effective ninety days thereafter, our Legislature passed an amendment and reenactment of W.Va. Code 7-1-37 which therein confers upon county commissions of counties with a population of 45,000 or more the power “to adopt building and housing codes establishing and regulating minimum building and housing standards for the purpose of improving the health, safety and well-being of its citizens.”7
The Legislature “in order to promote and protect the health, safety, morals and welfare of the public,” W.Va. Code § 16-15-2, provided for the creation of a corporate housing authority where the governing body of a city or county finds that “unsanitary or unsafe inhabited dwelling accommodations exist” or “that there is a shortage of safe or sanitary dwelling accommodations in such city or county” upon consideration of such factors as “the sanitary facilities, and the extent to which conditions exist in such buildings which endanger life or property by fire or other cause.” W.Va. Code § 16-15-3. Such authority has the power “to investigate into living and housing conditions in the city and into the means and methods of improving such conditions; to determine where unsanitary or substandard housing conditions exist; to study and make recommendations concerning ... areas in which unsanitary or substandard conditions ex[378]*378ist ..W.Va. Code § 16-15-7, and to establish and operate housing projects that provide “decent, safe and sanitary dwelling accommodations.” W.Va. Code § 16-15-17.
The Legislature passed the Housing Cooperation Law in an attempt to aid in the establishment of housing projects and declared “that there exists in the state unsafe and unsanitary housing conditions and a shortage of safe and sanitary dwelling accommodations for persons of low income; that these conditions necessitate excessive and disproportionate expenditures of public funds for crime prevention and punishment, public health and safety fire and accident protection, and other public services and facilities; and that the public interest requires the remedying of these conditions.” W.Va. Code § 16-16-2 (emphasis added). This Housing Corporation Law granted to state public bodies the power to enter into agreements to repair, close, or demolish unsafe, unsanitary or unfit housing projects. W.Va. Code § 16-16-4.
Also, the Legislature, finding “a serious shortage of sanitary, decent and safe residential housing,” W.Va. Code § 31-18-2(a), enacted the West Virginia Housing Development Fund Act in an effort to make available more housing of that nature.
Thus, the Legislature, having declared, “that the public interest requires the remedying of these conditions,” W.Va. Code § 16-16-2, has for some time been aware of the problems that emanate from uninhabitable dwellings and has made substantial efforts to deal with them by providing appropriate habitable housing, by having the State Fire Commission and State Department of Health impose requirements upon landlords, and by empowering municipalities and county commissions to enact and enforce building codes and health regulations. The Legislature has clearly embarked on a course to change the common law no-repair rule and its correlative doctrine of caveat emptor by recognizing that urban tenants seek not just space, but a habitable place to live.8 See King v. Moorehead, 495 S.W. 2d 65 (Mo.Ct. App. [379]*3791973) and Boston Housing Authority v. Hemingway, 363 Mass. 184, 189-90, 293 N.E.2d 831 840-2 (1973) where these courts faced with similar state statutes reached the same conclusion.
We therefore are compelled to agree completely with the following often-quoted passage from one of the pioneer American cases recognizing the implied warranty of habitability:
Legislation and administrative rules, such as the safeplace statute, building codes and health regulations, all impose certain duties on a property owner with respect to the condition of his premises. Thus, the legislature has made a policy judgment — that it is socially (and politically) desirable to impose these duties on a property owner — which has rendered the old common law rule obsolete. To follow the old rule of no implied warranty of habitability in leases would, in our opinion, be inconsistent with the current legislative [380]*380policy 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 ‘tumbledown’ houses is at least a contributing cause of such problems as urban blight, juvenile delinquency and high property taxes for conscientious landowners. Pines v. Perssion, 14 Wis. 2d 590, 595-96, 111 N.W.2d 409, 412-13 (1961).
We, therefore, hold that in a written or oral lease of residential premises,9 there is an implied warranty that the landlord shall at the commencement of a tenancy, deliver the dwelling unit and surrounding premises in a fit and habitable condition, and shall thereafter maintain the leased property in such condition.10
[381]*381II
The Legislature’s progressive abrogation of the common law no-repair rule was crystallized on March 11, 1978, when it added to our landlord-tenant law W.Va. Code § 37-6-30, a new section which requires the landlord to deliver and maintain the rental dwelling unit in a fit and habitable condition.11
[382]*382This Court today, by implying a warranty of habitability into residential leases, intends in no way to impose upon the landlord a greater burden than that set forth by the Legislature in our new statute. The landlord’s duty under the implied warranty and the statute are identical. That the case at bar arose before the effective [383]*383date of the new statute is, then, of little consequence insofar as the landlord’s duty is concerned.
But in order to answer fully the questions certified to us, we must deal with several topics not covered by the statute. Our treatment of these topics is intended, however, to guide not only the lower court which certified these questions to us but all courts of this state that will undoubtedly be called upon to deal with the new statute and these attending topics.
A. Mutual Dependency of Covenants
A lease under real property law was viewed as a conveyance for a term, and its covenants were not mutually dependent. Under such an interpretation, the duty to pay rent was not dependent upon the landlord’s compliance with the terms of the lease. Thus, even if a landlord agreed in the lease to keep the premises in good repair, his failure to do so would not relieve the tenant of his independent duty to pay rent.
But this common law approach arose before the development in contract law of mutually dependent covenants. The authorities agree today that the modern lease is both a conveyance and a contract.12 Corbin on Contracts, § 686 (1960 ed.); Thompson on Real Property, § 1110 (1959 replacement); Williston on Contracts, § 890 (3rd ed. Jaeger); Lesar, op. cit. supra. The cases adopting the implied warranty have likewise recognized that a residential lease must be treated as a contract. See, e.g., First National Realty Corp., supra, Green v. Superior Court, supra; Lemle v. Breeden, supra; Mease v. Fox, supra; Boston Housing Authority v. Hemingway, supra; [384]*384King v. Moorehead, supra; Marini v. Ireland, supra. Of the many cases that have implied a warranty of habitability into nonagrarian leases, none can be found which hold the implied warranty and the duty to pay rent to be independent. See Restatement (Second) of Property § 5.1 Comment b (1977).
Thus, our Legislature along with many American courts has acknowledged that the land is no longer the value sought by an urban tenant. What is sought is a place to live, not an estate in land. As Judge Skelly Wright said in Javins v. First National Realty Corp., 428 F.2d 1071, 1074-75 (D.C. Cir.), cert. denied, 400 U.S. 925 (1970), a leading case adopting the implied warranty of habitability:
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 ceiling, but also adequate heat, light and ventilation, serviceable plumbing facilities, secure windows and doors, proper sanitation, and proper maintenance. In our judgment the trend toward treating leases as contracts is wise and well considered.
Additionally, the growth in the number and detail of specific covenants in clauses found in leases regulating the use of the property further attests to their contractual nature. 2 R. Powell, Real Property ¶ 221[1] (1977); Lesar, op. cit. supra.
In response to the second certified question, we hold that since a lease of a residential dwelling unit is to be treated and construed as any other contract, the covenant to pay rent and the warranty of habitability are mutually dependent.13 Franklin v. Pence, 128 W.Va. 353, 36 S.E.2d 505 (1945); Jones v. Kessler, 98 W.Va. 1, 126 S.E. 344 (1925).
[385]*385B. Contractual Remedies.
Upon recognizing that a lease for urban living quarters is essentially a contract, the courts have uniformly made available to the tenant faced with the material breach of warranty the same common law contract remedies of damages, reformation and rescission, see, e.g., Mease v. Fox, supra; Boston Housing Authority v. Hemingway, supra; Fritz v. Warthen, supra; King v. Moorehead, supra; Restatement (Second) of Property §§ 5.1-5.4 (1977), “a more consistent and responsive set of remedies ...” Lemle v. Breeden, 462 P.2d 470 (Hawaii 1969). We, too, so hold.14
Therefore, in further answer to Certified Question No. 4(c) as to whether the tenant faced with the landlord’s breach of the warranty can vacate the premises and thereby terminate his obligation to pay rent, we need look only to the longstanding contract law of rescission. Breach of contract “so substantial as to tend to defeat the very object of the contract,” syl. pt. 1, Holderby v. Harvey C. Taylor Co., 87 W.Va. 166, 104 S.E. 550 (1920); see J. W. Ellison, Son & Co. v. Flat Top Grocery Co., 69 W.Va. 380, 71 S.E. 391 (1911) permits the injured party to rescind the contract. The warranty of habitability, a [386]*386covenant upon which the very duty to pay rent depends, is certainly a vital and essential provision of the lease. Breach of this covenant, upon which the vitality of the lease depends, would entitle the lessee to rescind the lease, to vacate the premises and to be relieved of any further rental obligation. Because the typical residential tenant enters into a lease in order to obtain a habitable place to live, his failure to receive such a place to live would unquestionably justify rescission.
Certified Question 5 asks whether a breach of the implied warranty of habitability is a defense to a landlord’s action for rent or damages. As is the case with many of the questions certified, the answer is to be found in the long-standing contract law of this jurisdiction. The answer to this particular question appears cogently in Franklin v. Pence, 128 W.Va. 353, 357, 36 S.E.2d 505, 508 (1945): “When the covenants are dependent and mutual, as here, a party who violates the contract cannot recover damages which result from its violation by the other party.” Thus, breach by the landlord of the implied warranty of habitability, a material covenant upon which the duty to pay rent depends, may be raised as a defense in a landlord’s action for rent. When the landlord sues for damages to the premises allegedly caused by the tenant, the tenant may raise breach of the implied warranty as a defense only to show that the damage to the premises resulted from and were caused by the landlord’s breach of the implied warranty. When the landlord sues for damages and the tenant contends that the warranty of habitability was breached, but does not maintain that the damages were directly caused by the breach, the tenant could counterclaim for damages reasonably arising from the breach of the implied warranty of habitability.
As to the “repair and deduct” inquiry in Certified Question 4(b), our research reveals that only one of the many cases adopting the implied warranty, Marini v. Ireland, 56 N.J. 130, 265 A.2d 526 (1970), allows the tenant this remedy. We feel at this time, as have apparently the majority of courts dealing with the issue, that the [387]*387wide range of contract remedies available to the tenant are adequate to enforce fulfillment of the implied warranty.
Along with these contractual remedies, of course, the tenant has certain responsibilities under the lease. For example, “Since the basic contract remedies are available to tenant, the basic contract duties are imposed upon him. The tenant is under an obligation to give landlord notice of a deficiency or defect not known to the latter.” Mease v. Fox, 200 N.W.2d 791, 797 (Iowa 1972). Furthermore, “The contract principle that a person may not benefit from his own wrong will exonerate a landlord for a defect or deficiency caused by a tenant’s wrongful conduct.” King v. Moorehead, supra at 76, citing Javins v. First National Realty Corporation supra at n. 62; Hinson v. Delis, 26 Cal. App. 3d 62, 70, 102 Cal. Rptr. 661, 666 (1972); Mease v. Fox, supra at 797.
C. Unlawful Detainer
W.Va. Code § 55-3-1 et seq. provides for the action for unlawful detainer, the common remedy used to evict tenants who violate the lease in one respect or another. It provides the method for recovering possession or damages from the tenant who “... detain[s] the possession of any land, building, structure, or any part thereof after his right has expired ...”
At common law, under the property principles discussed above, the landlord would prevail upon a mere showing that rent was not paid according to the lease and that possession was withheld. But when the covenants of a lease are viewed under contract law as being mutually dependent, the tenant’s right to possession may not necessarily expire upon his failure to pay rent. The landlord’s breach of warranty becomes directly related to the issue of possession. The tenant affirmatively alleging as a defense breach by the landlord of the implied warranty should be accorded the opportunity to show that his right to possession has not expired. In response to the fifth certified question, we hold that breach of the implied warranty is a defense to an action [388]*388for unlawful detainer.15 Accord, e.g., Javins v. First National Realty Corp., supra; Green v. Superior Court, supra; Jack Spring, Inc. v. Little, supra; Rome v. Walker, 38 Mich. App. 458, 196 N.W.2d 850 (1972); Fritz v. Warthen, supra; Foisy v. Wyman, supra.
D. The Measure of Damages
But while it is widely accepted that a residental lease is to be treated as a contract and that the common law remedies for breach are applicable, the courts addressing the issue have had great difficulty formulating an appropriate measure' of damages applicable to a breach of implied warranty. See generally M. Moskovitz, The Implied Warranty of Habitability: A New Doctrine Raising New Issues, 62 Cal. L. Rev. 1444, 1464-73 (1974).
Some courts adopt the “difference in value” approach. Under this method, the “tenant’s damages [is] measured by the difference between the fair market value of the premises if they had been as warranted and the fair rental value of the premises as they were during occupancy by the tenant in the unsafe and unsanitary conditions.” Green v. Superior Court, 10 Cal. 3d 616, 638, 517 P.2d 1168, 1183, 111 Cal. Rptr. 704, 719 (1974); Mease v. Fox, 200 N.W.2d 791, 797 (Iowa 1972); accord, Boston Housing Authority v. Hemmingway, 363 Mass. 184, 192, 293 N.E.2d 831, 845 (1973); see W.Va. Code § 46-2-714(2). If the fair market value of an apartment in its defective [389]*389condition is $100, yet would be worth $200 but for the breach of warranty, then the tenant sustains $100 per month in general damages. The actual monthly rent contracted for is irrelevant under this approach, except perhaps as evidence of the apartment’s fair market value.
The other approach to ascertaining damages is the “percentage reduction of use” method first set forth in Academy Spires, Inc. v. Brown, 111 N.J. Super. 477, 268 A.2d 556 (Dist. Ct. 1970) under which the court reduced the tenant’s rental obligation by a percentage corresponding to the relative reduction of use of the leased premises caused by the landlord’s breach. Under this method, if the tenant, due to the landlord’s breach, is denied the use of ten percent of an apartment renting for $200, then the tenant sustained damages of $20.00 per month.16
We feel that neither approach should be the exclusive mode of assessing damages in such cases. Of the two, the “difference in value approach” is far more widely accepted and we adopt it, in part, as the measure of damages in cases involving the breach of the implied warranty of habitability. But, money damages so assessed, while appropriate in the commercial cases, are [390]*390inadequate in most residential landlord-tenant tenant cases, since the residential tenant who endures a breach of the warranty of habitability normally does not actually lose only money. The typical residential tenant rents a dwelling for shelter, not profit. When the warranty is breached, he loses, instead, such intangibles as the ability to take a bath or use hot water as frequently as he would like, he may be forced to worry about the health of his children endangered by rats, roaches, or other undesirable pests, or he may be denied the use of certain rooms in the apartment because there is odor, severe water leakage, or no heat. “When [the measure of damages] is difficult to apply because the property in question is not used commercially, it may be necessary to formulate a measure of damages that is more uniquely adapted to the plaintiff’s injury.” Jarrett v. E. L. Harper & Son, Inc., _ W.Va. _, 235 S.E.2d 362, 365 (1978).
We recently addressed this precise issue in Jarrett v. E. L. Harper & Son, Inc., supra, where the plaintiff’s water well was destroyed by the defendant, a contractor building a sewer for a public service district. The plaintiffs, without water for five weeks while a new well was being completed, sued for “annoyance, inconvenience, and general unpleasantness.” We held in that case at syllabus point 3 that, “Annoyance and inconvenience can be considered as elements of proof in measuring damages for loss of use of real property.”
We feel that the true nature of the damages suffered by a tenant faced with a breach by the landlord of the warranty are not adequately measured by the exclusive use of the “difference in value” standard. Furthermore, the need for expert testimony under this approach could serve to deny the intended relief from a large number of low and middle income tenants who could not afford to litigate. Academy Spires Inc. v. Brown, 111 N.J. Super. 477, 486, 268 A.2d 556, 562 (Dist. Ct. 1970); Steinberg v. Carreras, 74 Misc. 2d 32, 38, 344 N.Y.S.2d 136, 144 (N.Y. City Civ. Ct. 1973).
[391]*391Therefore, in response to the fourth certified question, we hold that when the warranty of habitability is breached, the tenant’s damages are measured by the difference between the fair market value of the premises if they had been as warranted and the fair rental value of the premises as they were during the occupancy by the tenant in the unsafe and unsanitary condition. However, the tenant may additionally recover damages for annoyance and inconvenience proven to have resulted from the breach.
E. The Implied Warranty at Trial
The finder of fact in an action where the warranty of habitability is in issue must determine two things: (1) whether the implied warranty of habitability or fitness has been materially breached, and (2) how much of the tenant’s rental obligation was abated or offset by virtue of the breach.
Under (1) the determination of whether a landlord breached the warranty is a question of fact to be determined by the circumstances of each case. The breach must be of a substantial nature rendering the premises uninhabitable and unfit. Thus minor housing code violations or other dificiencies which individually or collectively do not adversely affect the dwelling’s habitability or fitness would not entitle the tenant to a reduction in rent.17 In making the determination of whether the [392]*392premises were uninhabitable and unfit, housing code violations and deficiencies should be scrutinized in light of such things as their nature, the length of time they persisted, their effect on safety and sanitation, the age of the structure, and the amount of rent charged.
Under (2), if no material breach of the implied warranty is found, then a judgment for possession, rent, or damages may issue for the landlord. In an action for unlawful detainer, if the finder of fact concludes that the tenant’s entire obligation to pay rent was suspended because of a total breach by the landlord, then the action for unlawful detainer will fail. And in an action for unlawful detainer, when it is found by applying the measure of damages set forth above that part, but not all, of the tenant’s obligation for rent is suspended, the tenant must be given an opportunity to pay that part of the rent that is due. If the tenant fails to pay that sum within a reasonable period of time, then the Court should enter judgment on behalf of the landlord.
Whenever breach of the implied warranty is raised as a defense to the landlord’s action for rent or as a defense or counterclaim to a landlord’s action for damages, the properly instructed finder of fact should apply the measure of damages as set forth above and determine the amount of money owed the tenant due to the breach. This amount should be deducted from the total amount of rent or damages the tenant is found to owe the landlord, or, where the tenant has counterclaimed, may result in a money award to the tenant.
[393]*393In some instances the tenant may maintain his own action for damages arising from the landlord’s knowing breach of the warranty of habitability. In such cases, the measure of damages set forth above shall be used. But in such cases the landlord is permitted to raise as a defense that the tenant owes rent or is himself responsible for the unsanitary or unsafe condition of the premises. And, cases where the tenant affirmatively sues for breach of warranty, the landlord can counterclaim to recover for damages to the premises wrongfully caused by the tenant.
F. Protective Orders
In order to protect the landlord from the assertion of a frivolous implied warranty claim by a tenant in possession, to assure the landlord that any rent money adjudicated as owed to him will be available, and to encourage the landlord to make timely repairs so as to minimize a tenant’s damages, several courts have held that the trial court, upon request, after determining that a fact questions exists as to a breach of warranty of habitability, may, during the pendency of the action, require the tenant in possession to make future rent payments or part thereof unto the court as they become due. Javins v. First National Realty Co., 428 F.2d 1071 (D.C. Cir.), cert. denied, 400 U.S. 925 (1970); Green v. Superior Court, 10 Cal.3d 616, 111 Cal. Rptr. 704, 517 P.2d 1168 (1974); Fritz v. Warthen, 298 Minn. 54, 213 N.W.2d 339 (1973); King v. Moorehead, 495 S.W.2d 65 (Mo. Ct. App. 1973); Restatement (Second) of Property § 10.3 (1977). See Moscowitz, op. cit., supra at 1473-1486; Note, 28 Stan. L. Rev. 729, 769-772 (1976).
The courts are sharply divided over whether these protective escrow orders should be allowed, and, where they are allowed, whether they should be the exception or the rule. We adopt the compromise approach set out in the leading case of Bell v. Tsintolas Realty Co., 430 F.2d 474 (D.C. Cir. 1970). Such protective orders are not favored, but are permitted “only in limited circumstances, only on motion of the landlord, and only after [394]*394notice and opportunity for a hearing on such a motion.” Id. at 479. According to Bell, the burden is on the landlord to show “an obvious need for such protection.” Id. at 484.
When ruling upon the motion for the protective order, the trial court may consider:
“... the amount of rent alleged to be due, the number of months the landlord has not received even a partial rent payment, the reasonableness of the rent for the premises, the amount of the landlord’s monthly obligations for the premises, whether the tenant has been allowed to proceed in the forma pauperis, and whether the landlord faces a substantial threat of foreclosure.”
The “obvious need” of the landlord of the protective order is to be balanced against “the apparent merits of the tenant’s defense.” If the landlord proves his “obvious need,” then the court may require the tenant in possession to make payments into the court pending disposition of the case. If the court believes that the tenant has a strong likelihood of succeeding on the merits, the court might refuse to enter a protective order. And if it both appears that the landlord has an “obvious need” and the tenant’s claim some “apparent merit,” the court might order that an amount less than the monthly contract rent be paid into the escrow account. See Blanks v. Fowler, 437 F.2d 677 (D.C. Cir. 1971).
The trial court, in lieu of establishing a court-administered escrow account, or the parties by mutual agreement might establish a private escrow arrangement that adequately protects the landlord. Fritz v. Warthen, supra.
This escrowed money represents rent only for the period between the filing of suit and trial. At trial, the escrowed amount should be apportioned between the parties consistent with the final judgment.
Finally, the courts have been very reluctant to allow the turnover order, that is, the pre-judgment award to the landlord of part or all of an escrow account. We [395]*395agree with this position. Courts may not invade escrow accounts before final judgment without the consent of the parties.
G. Waiver.
Allowing a tenant to “waive” the warranty could be tantamount to permitting the landlord to violate some statute, regulation or code enacted for the benefit of not only that tenant, but future tenants, adjoining tenants and landowners as well. Certainly no one can waive the obligations imposed by law upon landlords, and no one, by contract or otherwise, can agree to permit a landlord to violate the law. A waiver by the tenant, the one normally most likely to detect, endure, and report such violations, would tend to insulate the landlord from liability for his illegal conduct. If a tenant is allowed to waive his rights arising from the landlord’s breach of such ordinances, codes, statutes and regulations, a dilemma would ensue. If a tenant, after waiving the warranty, were to thereafter report violations of the law to the authorities charged with enforcement; the building could be condemned or appliances, water or utilities shut off leaving him with little or no civil recourse against the landlord. Since the tenant who has waived the implied warranty could suffer these severe consequences by reporting on illegality, it is not likely that he would be inclined to report the violations.
Additionally, since “[i]t is fair to presume that no individual would voluntarily choose to live in a dwelling that had become unsafe for human habitation” Bowles v. Mahoney, 202 F.2d 320, 326 (D.C. Cir. 1952) (Bazelon, J. dissenting) we hold that waivers of the implied warranty of habitability are against public policy. Given the proliferation of “form leases” and the current scarcity of habitable dwellings, there exists a distinct danger that such waivers would become routine. If tenants seeking the scarce available shelter are compelled to waive their rights and accept uninhabitable dwellings, then the protection accorded by the implied warranty and the statutes could become meaningless.
[396]*396III
This Court, along with many others, has concluded that the harsh common law rules of property, riddled historically with numerous exceptions, no longer exclusively govern the residential lease in light of legislative enactments and intent. Since the rights and duties of the landlord and residential tenant must be viewed under contract principles, the tenant’s duty to pay rent is dependent upon the landlord’s fulfillment of the implied warranty of habitability.
There are several ways a tenant might enforce the implied warranty. A tenant may raise breach of warranty as a defense to an unlawful detainer action since the landlord’s breach directly affects the right to possession even when the tenant is in arrears of rent. He may continue to pay rent and bring his own action later to recover damages caused by the landlord’s breach with difference in value, annoyance and inconvenience being elements of proof, or, after vacating the premises and suspending rent payments, he may raise breach of warranty as a defense to an action by the landlord for rent.
Accordingly, the trial court’s denial of the plaintiffs’ motions for “judgment on the pleadings and for partial summary judgment” is reversed and, as both parties have requested, the case is to be remanded to the Circuit Court of Logan County for further proceedings consistent with this opinion.
Reversed.