
106 Ill. App.3d 610 (1982)
435 N.E.2d 953
GERALD MAYFIELD et al., Plaintiffs-Appellees,
v.
ROBERT SWAFFORD, d/b/a Swafford Masonry, Defendant-Appellant.
No. 81-83.
Illinois Appellate Court  Fifth District.
Opinion filed May 14, 1982.
*611 Dennis J. Hogan, of Murphysboro, for appellant.
Caldwell, Troutt, Alexander & Quindry, of Benton, for appellees.
Affirmed in part, and reversed in part and remanded.
JUSTICE JONES delivered the opinion of the court:
After a trial before the circuit court of Franklin County sitting without a jury, judgment was rendered for plaintiffs on count I of their amended complaint in the amount of $11,381. That count alleged that the parties had entered into an oral contract for the construction of a swimming pool on plaintiffs' property and that defendant failed to construct the swimming pool in a "good workmanlike manner which will result in the plaintiffs having to repair the pool."
Defendant contends that the pool did not show evidence of being defective at the time of completion and was accepted and used by plaintiffs. Therefore, the pool was not defective.
Evidence was presented that the swimming pool, which was built of concrete blocks at a contract price of $7,000, was not properly constructed and that the results of the improper construction were cracking and movement of some of the blocks, breaks in the pipes between the filter and pool, floating of the vinyl pool liner, cracking of the concrete deck and loss of water.
R.A. Nack, a professional engineer with a Master of Science degree in structural engineering from the University of Illinois, testified as to the measures required in order to correct the improper construction. Those measures were that the concrete deck and the soil surrounding the perimeter of the pool would have to be removed to afford access to the piping system, the concrete block walls would have to be realigned where they had shifted from their proper location and had cracked, the liner would have to be removed in order to be able to work on the concrete blocks, the piping system would have to be replaced with adequate piping, the concrete blocks would have to be reinforced by inserting reinforcing steel into the cores, a perimeter wall of poured concrete or an additional concrete block wall on the exterior of the present concrete block wall would have to be constructed, backfill would have to be properly replaced, the liner, decking and cap would have to be replaced and reseeding done where necessary. Mr. Nack opined that the above work would cost $10,355. He further testified that his fee for inspecting the pool and "subsequent work" was $1,026. Another witness, Bernard Witunski, an installer of swimming pools, testified that plaintiffs' pool should be entirely replaced.
Thus, the cost of correcting the defects in plaintiffs' pool exceeds the contract price of $7,000 by about 50%, and a large part of the cost of correcting these defects will consist of the cost of undoing work alleged to be improperly done.
*612  1 The ordinary rule applied in cases involving building contracts is that a builder is not required to perform perfectly; rather, he is held only to a duty of substantial performance in a workmanlike manner (Brewer v. Custom Builders Corp. (1976), 42 Ill. App.3d 668, 356 N.E.2d 565; George Butkovich & Sons, Inc. v. State Bank (1978), 62 Ill. App.3d 810, 379 N.E.2d 837). "The purchaser who receives substantial performance of the building contract must pay the price bargained for, less a credit as compensation for deficiencies existing in what he received as compared to what strict performance would have given him. Watson Lumber Co. v. Guennewig; Broncata v. Timbercrest Estates, Inc., 100 Ill. App.2d 49, 241 N.E.2d 569." (Brewer v. Custom Builders Corp. (1976), 42 Ill. App.3d 668, 673, 356 N.E.2d 565, 570.) Accordingly, failure to perform in a workmanlike manner constitutes a breach of contract. Upon consideration of the record before us we have determined that the conclusion of the trial court that the work of constructing the pool was not done in a workmanlike manner was not against the manifest weight of the evidence. Thus, the plaintiffs are entitled to damages. Gaffney v. McCarron (1977), 45 Ill. App.3d 944, 360 N.E.2d 508.
 2 The pool was constructed in the spring of 1977, and the case was tried in the fall of 1980. Plaintiffs testified that some of the defects became apparent by the summer of 1977. Other defects were noticeable in subsequent years and became progressively worse, such as the cracking and shifting of the concrete blocks. Evidence was presented that showed that substandard workmanship caused the defects and that these defects were indeed substantial. It is no bar to the action that plaintiffs did not discover the defects until some time after the completion of construction. See Annot., 1 A.L.R.3d 870 (1965).
 3 Defendant argues that he is entitled to a setoff against the judgment on the basis of plaintiffs' testimony that their family made substantial use of the pool during the summers of 1977 and 1978 and some use of the pool in 1979. This issue, however, was not raised by the defendant in the pleadings. Although there was testimony that plaintiffs used the pool to some degree for three years, a setoff for defendant cannot rest upon such a defense where it was not pleaded. To decide otherwise would deprive plaintiffs of the right to notice and opportunity to defend against the issues they must meet. Kusy v. Johnson (1976), 41 Ill. App.3d 763, 354 N.E.2d 480.
Defendant contends that the damages awarded are excessive. Examination of the record discloses that the question of the proper measure of damages was given much consideration by the trial court and the parties. It was the plaintiff's position that the measure of damages should be either the cost of repair of the defects in the pool or the difference in market value occasioned by the construction of a defective pool. The court held *613 that if a rule based upon diminution in value was to be applied that diminution would have to be shown by a consideration of the entire tract of real estate involved, lot, house and pool, since the pool was an unseverable part of the real estate. The plaintiffs sought to show, by witness Wills, a real estate appraiser, that diminution in value by reason of a defective pool would be shown by comparison of the appraised value of the entirety of the tract as improved with a good pool with the value of the tract as improved with a defective pool. Plaintiffs suggested that the amount of damages derived by such a method would be the same as the amount of damages derived by following the cost-of-repair rule. But, since witness Wills had not made an inspection and appraisal of the subject real estate with its pool, he was not permitted to testify; his testimony would merely have constituted advice to the court upon the proper rule of law to be followed in the case and would not be evidence.
The plaintiff also, at one point, sought to introduce evidence as to the cost of replacing the pool. This evidence was disallowed by the trial court when there was no showing that the replacement pool would be comparable to the defective pool.
It is defendant's position that the proper measure of damages would be the difference between "the value of the pool as it is now and the value of the pool, had it been properly constructed."
At the close of all the evidence the court stated that it would take the matter under advisement to examine the case in at least two unnamed particulars. When its decision was rendered, it was in the form of a judgment in which no findings were made regarding the measure of damages applied. We are unable to find an expression in so many words of the rule regarding the measure of damages that was adopted by the trial court. We think it evident from the amount of the judgment, however, that the damages awarded represented the cost of repairs necessary to restore the pool.
We have noted in the record that the parties and the court considered the case of Brewer v. Custom Builders Corp. (1976), 42 Ill. App.3d 668, 356 N.E.2d 565, in their discussions of the proper measure of damages to be applied to the case. Since the trial of this case, two additional decisions merit consideration, the supreme court case of Park v. Sohn (1981), 89 Ill.2d 453, 433 N.E.2d 651, and Witty v. C. Casey Homes, Inc. (1981), 102 Ill. App.3d 619, 430 N.E.2d 191.
 4, 5 As a general rule, when performance by a builder has been less than full performance of a construction contract, the measure of damages is the cost of correcting the defects or completing the omissions. (Park v. Sohn; Witty v. C. Casey Homes, Inc.; Brewer v. Custom Builders Corp.) Where, however, application of that measure of damages would require an unreasonable destruction of the work done by the contractor or would *614 incur costs disproportionate to the results obtained, the appropriate measure of damages is the diminution in value attributable to the defects in construction. Park v. Sohn; Witty v. C. Casey Homes, Inc.; Annot., 76 A.L.R.2d 805 (1961).
The foregoing rule has been recognized and explained in the Restatement (Second) of Contracts sec. 348(2)(b) (1981), which provides:
"Alternatives to Loss in Value of Performance
*   *   *
(2) If a breach results in defective or unfinished construction and the loss in value to the injured party is not proved with sufficient certainty, he may recover damages based on
* * *
(b) the reasonable cost of completing performance or of remedying the defects if that cost is not clearly disproportionate to the probable loss in value to him."
In the comments following the recitation of the rule, it is stated:
"Sometimes, especially if the performance is defective as distinguished from incomplete, it may not be possible to prove the loss in value to the injured party with reasonable certainty. In that case he can usually recover damages based on the cost to remedy the defects. Even if this gives him a recovery somewhat in excess of the loss in value to him, it is better that he receive a small windfall than that he be undercompensated by being limited to the resulting diminution in the market price of his property.
Sometimes, however, such a large part of the cost to remedy the defects consists of the cost to undo what has been improperly done that the cost to remedy the defects will be clearly disproportionate to the probable loss in value to the injured party. Damages based on the cost to remedy the defects would then give the injured party a recovery greatly in excess of the loss in value to him and result in a substantial windfall. Such an award will not be made. It is sometimes said that the award would involve `economic waste,' but this is a misleading expression since an injured party will not, even if awarded an excessive amount of damages, usually pay to have the defects remedied if to do so will cost him more than the resulting increase in value to him. If an award based on the cost to remedy the defects would clearly be excessive and the injured party does not prove the actual loss in value to him, damages will be based instead on the difference between the market price that the property would have had without the defects and the market price of the property with the defects. This diminution in market price is the least possible loss in value to the injured party, since he could always sell the property on the market even if it had no *615 special value to him." Restatement (Second) Contracts sec. 348, comment c (1981).
We come, now, to the application of the rules of damages of Park v. Sohn, and the other authorities discussed above, to this case. The cost to repair the defects in the pool were fixed by the judgment rendered by the trial court at $11,381. When compared to the original contract price of $7,000 for construction of the pool, the cost of repair seems unreasonably disproportionate to the benefit to the owner. This is to say, it would cost the defendant $11,381 to furnish the plaintiff with a $7,000 pool. The disproportion in the cost-benefit ratio involved here demonstrates the "economic waste" that can be involved and serves to explain the foundation which underlies that aspect of the rule which bases the damages for faulty or incomplete construction upon the diminution in value.
Another facet of the rule that fixes the amount of damages as the diminished value is presented by this case. That is, to make the repairs to the pool as they were described in the evidence would entail unreasonable destruction of the builders' work. Apparently, to make the necessary repairs, it would require a substantial reconstruction of the entire facility.
We have concluded that due regard for the damages rule of Park v. Sohn requires that consideration be given to the amount of damages as determined by the diminution in value of the plaintiffs' property by reason of the faulty construction. Although simple to state, the rule is not so simple in its application. The diminution in value rule arose largely in the context of construction of dwellings and buildings where faulty or incomplete construction nevertheless left the owner with a structure possessing a degree of usability or utility.
In contrast, the structure involved in this case is a swimming pool. It is unattached to plaintiffs' residence and was added to the property subsequent to the construction of the residence. Its builder did not build the residence. The pool is apparently constructed so that it became a part of the real estate. Of greater import, however, is the fact that in its present condition the pool has no use, function or utility to the owner. Its presence on the property detracts from, rather than adds to, the value of the property. Consequently, the cost of removal of the useless structure and the cost of restoration of the site to its original condition become factors in determining the extent of the diminution in value of the owner's property.
These considerations require an adaptation of the segment of the Park v. Sohn rule of damages that is invoked when correction would require an unreasonable destruction of the work done by the contractor or would incur costs disproportionate to the results obtained. Where the improvement has no use or utility, the amount by which the property has been diminished in value would reflect the cost of removal of the entirety of the structure and the restoration of the site to its original condition. The *616 amounts paid by the plaintiffs for the original construction will be entered into the diminution of value standard by measuring the diminution of value of the property as it would have been improved with a properly constructed pool. That value is then to be compared with the value of the property with no pool at all. The cost of removal of the pool and restoration of the site to its original condition debases the value of the lot with no pool at all. Such debasement should, however, make allowance for any salvage obtained in the removal process. Therefore, in this case, since the pool in its present condition would have no value to the plaintiff, a determination of diminution in value would include the cost of removing the pool and restoring the property to its original condition (less the value of any salvage obtained in the removal process) in addition to reimbursement of the contract price of $7,000.
The trial court has already determined the cost of repairs necessary to restore the pool. No evidence was offered or received regarding any residual use of the pool or regarding the diminution of the value of plaintiffs' property.
In a similar situation in Witty v. C. Casey Homes, Inc. (1981), 102 Ill. App.3d 619, 430 N.E.2d 191, the court affirmed a judgment rendered in the trial court for defendant-builder because the owner produced evidence only of the cost of repairs of faulty construction and such cost was found to be disproportionate to the benefit to the owner. The owner produced no evidence regarding the diminution in value by reason of the faulty construction. The result in the Witty case seems harsh since it penalizes the innocent owner and rewards the contractor who breached the contract by faulty performance.
We believe the better rule would be to remand the case to the trial court for a hearing upon the diminution in value to plaintiffs' property resulting from the faulty construction, such diminution to be determined along the guidelines we have discussed. The plaintiffs will then be entitled to judgment for the lesser of the two amounts to be compared, that is, the lesser of the amount of the cost of repairing the pool, already established as $11,384, and the amount of the diminution in the value of plaintiffs' property.
Judgment affirmed in part and reversed in part, and remanded for further proceedings.
Affirmed in part, reversed in part and remanded.
HARRISON and KASSERMAN, JJ., concur.
