
    Frank Blood vs. Epaminondas Wilson.
    Suffolk.
    Nov. 20, 1885.
    Jan. 11, 1886.
    Devens & Gardner, JJ., absent.
    If one party to a contract has not fully performed it, but has, in good faith, done what he believes to be a compliance with it, and the other party receives a benefit thereby, the former can recover, in an action upon an account annexed, the value of his work and materials, not exceeding the contract price, after deducting the damages which the other party has sustained by the breach of the terms of the contract.
    Contract, upon an account annexed, for work and materials. The defendant filed a declaration in set-off for $50. Trial in the Superior Court, before Staples, J., who allowed a bill of exceptions, in substance as follows: ■
    The plaintiff offered evidence tending to show that the agreement between the parties was that he should paint the outside of the defendant’s house two coats of paint, in a good and workmanlike manner, giving as good a job as could be, with two coats, for $140 ; and that he performed his contract, and also did the extra work charged in the declaration.
    The defendant offered evidence tending to show that the agreement between the parties was that the plaintiff should paint the house so as to make a first-class job of it, putting on two coats, if two were sufficient, if not, more; that the price was to be $140; that the plaintiff did not perform his contract; that the painting was of a poor and defective character; that the defendant subsequently expended the sum of $74 for painting the house in a suitable manner, and contended that even this did not make good what he was entitled to under the contract; and that, while the work was in progress, and at its close, the defendant, insisting that the contract had not been fulfilled, requested of the plaintiff its performance, but the plaintiff contended that he had fully performed it.
    It was admitted that the sum of $50, claimed in the declaration in set-off, was paid to the plaintiff in November, 1883, he offering evidence tending to show that the payment was on .account of work done under the contract; and the defendant offering evidence tending to show that the same was not to take effect as payment, except on condition that the contract was performed.
    The plaintiff also offered evidence tending to show that he performed his work in good faith; that what he did was beneficial to the defendant; and that, if his work varied from the contract at all, it was substantially like it. The defendant offered evidence tending to show that the work was not done in good faith, and was of no benefit, but an injury to him; and that it was entirely at variance with the contract.
    The defendant contended that the plaintiff was not entitled to recover anything for painting the outside of the house ; that in regard to the extra work proved to have been done, and for which the defendant admitted a liability for $22.75, whatever was requisite of said $50 should be applied in payment; and that the defendant should have a verdict on his declaration in set-off for the balance of the $50 not so applied.
    The judge instructed the jury, in respect to the contract for the painting, that there was no evidence of a waiver of its provisions, or of an acceptance by the defendant, to be considered by them; that the contract was entire, whether it was as claimed by the plaintiff, or as claimed by the defendant; that the jury must decide, first, what the contract was, and, secondly, whether the contract, as it existed, was performed; and that, if the plaintiff performed his contract, he was entitled to recover the amount remaining due under it.
    The judge further instructed the jury as follows: “ If the plaintiff has endeavored in good faith to perform the contract between the parties, and has substantially done so, and thereby has conferred on the defendant a substantial benefit, although he has failed in some particulars to perform the contract, he may recover in this action what his work and the materials furnished by him are fairly worth, having regard to the contract price. The defendant is entitled to the benefit of his contract; and, in the case above supposed, the jury should deduct from the contract price such a sum as will enable the defendant, with the amount thus deducted, to make good what he has suffered by the failure of the plaintiff to fulfil his contract in all particulars; and the plaintiff should recover only the balance of the contract price due after making this deduction. If the jury should find that the plaintiff endeavored to perform his contract, acted in good faith, and that what he did do conferred a benefit upon the defendant, although the plaintiff failed in some particulars to perform his contract, still he is entitled to recover what his labor and the materials furnished by him are fairly worth, having regard to the contract price. The defendant has a right still to the benefit of his contract, and the jury should then deduct from the contract price such sum as will enable the defendant to make good what he has suffered by the failure of the plaintiff to perform the contract in all particulars.”
    The jury returned a verdict for the plaintiff; and the defendant alleged exceptions.
    
      E. B. Powers §• S. L. Powers, for the defendant.
    
      W. W. BlaeJcmar H. N. Sheldon, for the plaintiff.
   Morton, C. J.

It is well settled in this Commonwealth, that when a special contract has not been fully performed, but the plaintiff has in good faith done what he believed to be a compliance with the contract, and has thus rendered a benefit to the defendant, he can recover the value of his services not exceeding the contract price, after deducting the damages which the defendant has sustained by the breach of the stipulations of the contract. Hayward v. Leonard, 7 Pick. 181. Reed v. Scituate, 7 Allen, 141. Atkins v. Barnstable, 97 Mass. 428. Denham v. Bryant, 139 Mass. 110.

The instructions at the trial, to which the defendant excepted, were in compliance with this rule, and were correct.

Exceptions overruled.  