P signed a contract with D to construct a three-family house on land owned by D. The contract price was $91,000 to be paid in five installments and the project completion date was March 4, 1977. The first four scheduled payments were made except for $2,000 withheld for incomplete items. The total payments made were $67,100. There was a balance of $23,900 on the contract price. P demanded the balance due in August 1977, but D refused in that the house was not complete and some of the work was defective. The trial court found that the work had not been finished as the heating system was not approved until October 1977 and a certificate of occupancy was not issued until November 9, 1977. The trial court deemed November 9th as the date when the contract had been substantially performed. P got a judgment for the $23,900 and certain extras of $1,118.30 but deducted was $5,002.90 for defective or incomplete work and for the loss of rent suffered by D for the period of unjustified delay.