#### DALE H. PRACHT and Jeanne M. Pracht, Husband and Wife, Plaintiffs and Appellants, *v.*SCOTT S. ROLLINS and LaDonna K. Rollins, Husband and Wife, Defendants and Respondents.

No. 89-83.

Submitted on Briefs July 20, 1989.

Decided Aug. 31, 1989.

779 P.2d 57.

*63Jon A. Oldenburg, Lewistown, for plaintiffs and appellants.

Timothy J. O’Hare, Lewistown, for defendants and respondents.

MR. JUSTICE GULBRANDSON

delivered the Opinion of the Court.

Plaintiffs, Dale H. and Jeanne M. Pracht, filed a complaint in the District Court of the Tenth Judicial District, Fergus County, seeking specific performance of a contract for deed dated August 14, 1984. Defendants, Scott S. and LaDonna K. Rollins, filed a counterclaim, seeking rescission of the contract due to a breach of the implied *64warranty of habitability and workmanship. The District Court, sitting without a jury, entered judgment for defendants. Plaintiffs appeal. We affirm in part, reverse in part and remand.

The issues raised on appeal are:

1. Whether the District Court erred by determining that plaintiffs breached the implied warranty of habitability.

2. Whether the District Court erred by rescinding the contract for deed due to failure of consideration.

Dale H. and Jeanne M. Pracht, current residents of Wisconsin, owned and still own in fee simple absolute a house built by Dale H. Pracht and located in Fergus County, Montana. Dale H. Pracht is a pharmacist by profession but built and sold two other houses prior to the house that is the subject of this case. After building the house during 1982 and 1983, the Prachts advertised the house for sale in 1984 as a “newer high-tech solar home.” The Prachts sold the property and house located thereon to Scott S. and LaDonna K. Rollins for $65,000 via a contract for deed dated August 14, 1984. The Rollinses paid $7,500 as a downpayment and commenced to make the monthly payments on the house beginning in August, 1984.

The Rollinses moved into the house shortly after signing the contract for deed. Beginning in December, 1984, the Rollinses became alerted to a possible humidity problem in the house. The Rollinses first discovered that cloth items they stored in a closet of the house for approximately four months were moldy and had to be thrown away. Other problems slowly manifested themselves throughout 1985 and 1986. Specifically, during the summer of 1985, the Rollinses noticed that the paint was beginning to peel off the deck, supposedly as a result of using green lumber, and a few of the boards on the deck were curling up. The Rollinses also began to notice that when they closed the doors and windows in the house, they expanded and were therefore very hard or even impossible to open or close again. This problem was also attributed to the humidity problem found within the house.

Near the end of 1985 or the beginning of 1986, the Rollinses noticed that the siding of the house started to pull away from where it was joined together. After the siding began to give way, the Rollinses then noticed that the house was not sheathed underneath or braced with plywood; as a result, gaps began to form in the siding. The Rollinses also noticed that the garage roof began to leak; that mold was growing in several window and closet areas; that the window sills began to crack; and that during the winter of 1986-87 the *65foundation of the house began to separate from the backfill soil. Scott Rollins also testified that he suspected a wiring defect in the house because light bulbs did not seem to last in the house and because they had to have their microwave repaired four different times. According to the repairman, the microwave breakdowns occurred as a result of power surges.

The Rollinses initially took steps to repair and fix the problems, including venting the clothes dryer outside and putting in a new window in the basement. However, in light of all of the problems that began to appear after the Rollinses bought the house, they finally made a decision in late December of 1986 or early January of 1987 to move out of the house. Beginning in June, 1987, and after contacting an attorney, the Rollinses ceased making payments under the contract for deed. The Rollinses, via their attorney, sent a notice to the Prachts on July 7, 1987 stating that the house was noticeably deteriorating and that it was becoming uninhabitable. The Rollinses then demanded cancellation of the contract and a refund of their downpayment. The Prachts responded in October, 1987 by filing a lawsuit seeking specific performance of the August 14, 1984 contract for deed in the District Court of the Tenth Judicial District, Fergus County. The Rollinses filed a counterclaim, seeking rescission of the contract for deed due to a breach of the implied warranty of habitability and workmanship. The Rollinses then remained in the house until October, 1988 without making any further payments.

The District Court, sitting without a jury, found that the house was not constructed in a workman-like manner or according to the Uniform Building Code; that the defects the Rollinses discovered in the house were not readily apparent when they bought the house and did not begin to appear until December, 1984; that the Rollinses relied upon the Prachts’ representations that they were capable of building, and did build a “high-tech” energy efficient house; and that neither Scott nor LaDonna Rollins were knowledgeable in the construction of houses. The court then concluded that the Prachts breached the implied warranty of habitability and workmanship in building the house; that the breach was material and constituted a condition entitling the Rollinses to stop making their payments under the contract for deed; that the Prachts, as the builder-vendor of the house, were in a better position to have prevented the improper construction of the house and to have avoided the problems; and that the Rollinses were entitled to rescission of the contract which therefore entitled them to recover their $7,500 downpayment. *66The court, however, allowed the Prachts to retain the monthly payments made by the Rollinses from August, 1984 through May, 1987 as reasonable rent. The District Court then entered judgment for the Rollinses on January 4, 1989. The Prachts appeal from this judgment.

The first issue raised on appeal is whether the District Court erred by determining that the Prachts breached the implied warranty of habitability.

This Court first recognized the implied warranty of habitability in 1982 in *Chandler v. Madsen*(1982), 197 Mont. 234, 642 P.2d 1028. In *Chandler,*the evidence demonstrated that the house was uninhabitable due to inoperative doors, windows, and locks; cracked walls and floors; broken windows; bent plumbing; uneven and bulged floors; separation between fixtures and walls; cracked bathroom tiles; and a settlement of the foundation by 3.6 inches in some areas. We therefore abandoned the doctrine of *caveat emptor*and adopted the implied warranty of habitability. We held that a builder-vendor of a new house impliedly warrants that the house is constructed in a workman-like manner and is suitable for habitation. *Chandler,*197 Mont. at 239, 642 P.2d at 1031. In a subsequent case, *Degnan v. Executive Homes, Inc.*(1985), 215 Mont. 162, 696 P.2d 431, we upheld the application of the implied warranty of habitability. In *Degnan,*the house in question suffered from structural damage as a result of it being built on unstable ground. We again emphasized that the theory behind the implied warranty of habitability is not one of fault, but rather that the builder-vendor is in a better position to prevent the resulting harm and therefore is properly liable as opposed to the innocent buyer. *Degnan,*215 Mont. at 166, 696 P.2d at 433. We then held that the builder-vendor was liable for defects in the structure which made it uninhabitable. *Degnan,*215 Mont. at 166-67, 696 P.2d at 434.

More recently, in *Samuelson v. A.A. Quality Const., Inc.*(Mont. 1988), [230 Mont. 220,] 749 P.2d 73, 45 St.Rep. 157, this Court further refined the definition of the implied warranty of habitability. In *Samuelson,*the basement of the house in question had a water seepage problem. As a result of the seepage problem, the buyers had to remove furniture from the guest room; remove portions of the sheet-rock in an attempt to locate the problem; roll back the carpeting for weeks at a time to allow the floor to dry; install floor heaters to dry the wet areas; raise items in the storeroom; restrict the use of the recreational room; use a pump to clear the crawl space of excess *67water; and make use of a vacuuming service to clear the water from the basement. The buyers eventually had the problems remedied. We then held that “the implied warranty of habitability of a dwelling house is limited to defects which are so substantial as reasonably to preclude the use of the dwelling as a residence.” *Samuelson,*749 P.2d at 75, 45 St.Rep. at 160.

In the present case, the Prachts argue that the implied warranty of habitability does not apply in this case. They argue that they are not a “builder-vendor” as contemplated by this Court. Further, the Prachts argue that they built the house for themselves and then resided in it for approximately a year, therefore they argue that the house was not new at the time of the sale. The Prachts also argue that even if this Court finds that the implied warranty of habitability applies, that the defects in this house do not equal a breach of the warranty since the defects do not reasonably preclude the use of the house as a residence. We disagree.

The record reveals that Dale Pracht had built and sold at least two other houses prior to building the house in question and then selling it to the Rollinses. Although Dale Pracht is obviously an amateur builder and a pharmacist by profession, the implied warranty of habitability is nonetheless applicable. As noted earlier, the theory behind the implied warranty is not to discern fault, but to place the liability on the party most able to prevent the resulting harm. Dale Pracht was the builder-vendor and was thus in a better position to prevent the structural and design problems that arose in the house than the innocent buyers — the Rollinses. Further, the record also reveals that although the Prachts lived in the house for approximately a year, they nonetheless had not yet completed the house before selling it to the Rollinses. The District Court therefore did not err in finding that the implied warranty of habitability applied in this case.

We also hold that in light of the facts, the District Court did not err in finding that the defects in the house constituted a breach of the implied warranty of habitability. The District Court found and the evidence shows that a severe ventilation problem existed in the house as a result of the design and construction of the house. As a consequence, problems began gradually to manifest themselves while the Rollinses were living in the house. These problems included inoperative windows, doors, and locks; a faulty heating and air exchange system; cracked window sills and door frames; moldy fixtures; a leaky garage roof; separation of the foundation from the *68backfill soil; and separation of the siding from each other and the house. The defects also included the house not being properly sheathed or braced with plywood. These problems constituted defects which were so substantial as reasonably to preclude the use of the dwelling as a residence. Merely because the occupants continued to live in the house until they were able to find another suitable place to live, does not necessarily mean that the defects were not so substantial as to preclude reasonably, the use of the dwelling as a residence. We therefore affirm the District Court on this issue.

The second issue on appeal is whether the District Court erred by rescinding the contract for deed due to failure of consideration.

In Conclusion of Law No. 6, the District Court stated that the house was not what the Prachts represented it to be and therefore it was not what the Rollinses had reasonably expected. The District Court therefore concluded that the Rollinses were entitled to rescind the contract as a result of a substantial failure of consideration. The Prachts argue in part that the District Court erred in concluding that the Rollinses were entitled to rescind the contract as a result of failure of consideration because the Rollinses did not plead this affirmative defense as required by Rule 8(c), M.R.Civ.P.. We agree with this part of the Prachts’ argument.

Rule 8(c), M.R.Civ.P., states that “a party shall set forth affirmatively . . . failure of consideration ...” An affirmative defense is generally waived if not set forth affirmatively. *Chandler,*97 Mont. at 241, 642 P.2d at 1032. The record shows that the Rollinses did not plead the affirmative defense of failure of consideration in either their answer or their counterclaim. Therefore the District Court erred in concluding that the Rollinses were entitled to rescind the contract as a result of failure of consideration.

The court, however, also stated in its Conclusions of Law No. 8, that the Rollinses were entitled to rescission of the contract due to the Prachts’ material breach of the implied warranty of habitability and workmanship. The Prachts then also attempt to argue that the equitable remedy of rescission is applicable only in those circumstances that are set forth in § 28-2-1711, MCA, which addresses when a party to a contract may rescind. While many of our common law principles have been codified in statutes, a court of equity nonetheless is not bound by the codified laws when fashioning an equitable result. On the contrary, a court sitting in equity has all the power requisite to render justice between the parties. *Maddox v. Norman*(1983), 206 Mont. 1, 13-14, 669 P.2d 230, 237; *Rase v. Cas*
      *69
      *tle Mountain Ranch, Inc.*(Mont. 1981), [_Mont._,] 631 P.2d 680, 687, 38 St.Rep. 992, 1000. We thus reject the Prachts’ argument that rescission is not proper in this case, however, we do note that the District Court did not properly consider all of the available evidence. After finding that the Rollinses were entitled to rescission of the contract, the District Court also found that the Rollinses were entitled to recover their $7,500 downpayment and that the Prachts were entitled to retain the monthly payments made by the Rollinses as reasonable rent. However, we note that when fashioning this remedy, the District Court failed to consider the time the Rollinses spent in the house from June, 1987 to October, 1988. During this sixteen month time period, the Rollinses lived in the house without paying the Prachts any sort of reasonable rent. In light of the District Court’s oversight of this evidence, we remand this case to the District Court to consider all of the evidence before fashioning a remedy.

Affirmed in part, reversed in part, and remanded.

MR. CHIEF JUSTICE TURNAGE and MR. JUSTICES HARRISON, SHEEHY and HUNT concur.