1 Hayward v. Leonard, 7 Pick. 184. In this case H. contracted in writing to build a house for L., by a certain time, of certain dimensions, and in a certain manner, on L.'s land, and afterwards built the house within the time, of the dimensions agreed on, but in workmanship and materials varying from the contract. L. was present almost every day during the building, and had an opportunity of seeing all the materials and labor, and objected at times to parts of the materials and work, but continued to give directions about the house, and ordered some variations from the contract. He expressed himself satisfied with parts of the work from time to time, though professing to be no judge of it. Soon after the house was done he refused to accept it, but H. had no knowledge that he intended to refuse it, until after it was finished. It was held, that H. might maintain an action against L. on a quantum meruit for his labor, and on a quantum valebant for the materials. Chief Justice Parker, in his judgment, says: " In this case there is a great array of authorities on both sides, from which it appears very clearly that different judges and different courts have held different doctrines, and sometimes the same court at different times. The point in controversy seems to be this; whether when a party has entered into a special contract to perform work for another, and to furnish materials, and the work is done and the materials furnished, but not in the manner stipulated for in the contract, so that he cannot recover the price agreed by an action on that contract, yet nevertheless the work and materials are of some value and benefit to the other contracting party, he may recover on a quantum meruit for the work and labor done, and on a quantum valebant for the materials. We think the weight of modern authority is in favor of the action, and that upon the whole it is conformable to justice, that the party who has the possession and enjoyment of the materials and labor of another, shall be held to pay for them, so as in all events he shall lose nothing by the breach of contract. If the materials are of a nature to be removed, and liberty is granted to remove them, and notice to that effect is given, it may be otherwise. But take the case of a house or other building fixed to the soil, not built strictly according to contract, but still valuable and capable of being advantageously used or profitably rented, - there having been no prohibition to proceed in the work after a deviation from the contract has taken place, - no absolute rejection of the building, with notice to remove it from the ground; it would be a hard case indeed if the builder could recover nothing.

"And yet he certainly ought not to gain by his fault in violating his contract, as he may, if he can recover the actual value; for he may have contracted to build at an under price, or the value of such property may have risen since the contra«t was entered into. The owner is entitled to the benefit of the contract, and therefore he should be held to pay in damages only so much as will make the price good, deducting the loss or damage be absolutely injurious, the workman is responsible, whenever his contract is to do the thing well and skilfully.1

§ 895. If, however, the subject-matter on which the work is done be old, so that it could not be returned, as when a occasioned by the variation from the contract. As in the case of Smith against the proprietors of a meeting-house in Lowell, determined at March term, 1829, in Suffolk [8 Pick. 178].....It is laid down, as a general position in Buller's Nisi Prius, 139, that if a man declare upon a special contract and upon a quantum meruit, and prove the work done but not according to the contract, he may recover on the quantum meruit, for otherwise he would not be able to recover at all. Mr. Dane (vol. i. p. 223) disputes this doctrine, and thinks it cannot be law unless the imperfect work be accepted. Buller makes no such qualification; and yet it would seem to be reasonable that if the thing contracted for was a chattel, the party for whom it was made ought not to be held to take it and pay for it, unless it is made according to the contract, as a ship, a carriage, etc.; and this principle seems to be of common use in regard to articles of common dealing, such as wearing apparel, tools, and implements of trade, ornamental articles, furniture, etc. There seems to be, however, ground for distinction in the case of buildings erected upon the soil of another, for in such case the owner of the land necessarily becomes owner of the building. The builder has no right to take down the building or remove the materials; and though the owner may at first refuse to occupy, he or his heirs or assignees will eventually enjoy the property. And in such cases the doctrine of Buller is certainly not unreasonable. The case put by Buller to illustrate his position, is that of a house built on contract, but not according to it.

"Mr. Dane's reasoning is very strong in the place above cited, and subsequently, in vol. ii. p. 45, to show that the position of Buller, in an unlimited sense, cannot be law; and some of the cases he puts are decisive in themselves. As if a man who had contracted to build a brick house, had built a wooden one, or instead of a house, the subject of the contract, had built a barn. In these cases, if such should ever happen, the plaintiff could recover nothing without showing an assent or acceptance, express or implied, by the party with whom he contracted. Indeed such gross violations of contract could not happen without fraud, or such gross folly as would be equal to fraud in its consequences. When we speak of the law allowing the party to recover on a quantum meruit or quantum valebant, where there is a special contract, we mean to confine ourselves to cases in which there is an honest intention to go by the contract, and a substantive execution of it, but some comparatively slight deviations as to some particulars provided for. Cases of fraud or gross negligence may be exceptions.

"In looking at the evidence reported in this case, we see strong grounds for an inference that the defendant waived all exceptions to the manner in which the work was done. He seems to have known of the deviations from the contract; directed some of them himself; suffered the plaintiff to go on with his work; made no objection when it was finished, nor until he was called on to pay. But the case was not put to the jury on the ground workman is employed to repair a thing, the employer would not be liable on a quantum meruit, if the work were not done properly or according to the contract.1

§ 896. Again, under a general agreement to make a thing, the workman impliedly warrants that he has sufficient skill to make it properly, and if it be wholly unfit for the purpose for which it was designed, he cannot compel his employer to take it.2 Thus, where a workman undertook to rebuild the front of a house, and built it so out of the perpendicular that it required to be taken down;3 and where a workman agreed to erect a stove in a shop and to lay a tube under the floor to carry off the smoke, and the plan utterly failed, so that the stove could not be used,4 - it was held that neither was entitled to any remuneration. So, also, the same rule applies to work done upon an article owned by the bailor. If the work done be of no value, the bailor is not bound to pay for it; if it of acceptance or waiver, but merely on the question, whether the house was built pursuant to the contract or not; and if not, the jury were directed to consider what the house was worth to the defendant, and to give that sum in damages. We think this is not the right rule of damages; for the house might have been worth the whole stipulated price, notwithstanding the departures from the contract. They should have been instructed to deduct so much from the contract price, as the house was worth less on account of these departures." See also Smith v. First Cong. M. H. in Lowell, 8 Pick. 178; Olmstead v. Beale, 19 Pick. 528; Hayden v. Madison, 7 Greenl. 76; Jennings v. Camp, 13 Johns. 94; Kettle v. Harvey, 21 Vt. 301; Snow v. Ware, 13 Met. 42; Gleason v. Smith, 9 Cush. 484; Farnsworth v. Garrard, 1 Camp. 38; Basten v. Butter, 7 East, 479; Cutler v. Close, 5 C. & P. 337; Thornton v. Place, 1 Mood. & Rob. 218; Grant v. Button, 14 Johns. 377. See Mon-del v. Steel, 8 M. & W. 858; Story on Bailm. § 426, 437, 441; Dubois v. Del. & Hudson Canal Co., 4 Wend. 285; 1 Bell, Comm. 456; Bracey v. Carter, 12 Ad. & El. 373; Lewis v. Samuel, 8 Q. B. 685.

1 Ibid.; Eldridge v. Rowe, 2 Gilman, 91; Miller v. Goddard, 34 Me. 102; Olmstead v. Beale, 19 Pick. 529; Davis v. Maxwell, 12 Met. 286.

2 Jones v. Bright, 5 Bing. 535; Gray v. Cox, 4 B. & C. 108; Chanter v. Hopkins, 4 M. & W. 399; Ollivant v. Bayley, 5 Q. B. 289; Shepherd v. Pybus, 4 Scott, N. R. 444. A dentist is required to use reasonable skill in his work, but there is no implied warranty of perfect success. Simonds v. Henry, 39 Me. 155 (1855). So, of a physician or surgeon, Leighton v. Sargent, 27 N. H. 460; Hencke v. Hooper, 7 Car. & P. 81; Howard v. Grover, 28 Me. 97; Tefft v. Wilcox, 6 Kans. 46 (1870).

3 Farnsworth v. Garrard, 1 Camp. 38.

4 Duncan v. Blundell, 3 Stark. 6. And see Dermott v. Jones, 2 Wall. 1.

§ 897. When the work is left unfinished, the only question is, whether the contract was an entirety. If the agreement were, that the whole should be done, as if the work be contracted for by the job, the performance of the whole is a condition precedent to a recovery of any part of the compensation by the workman.2 But if the contract be severable, as if it be to do the work by the day, the workman will be entitled to a compensation pro tanto, although he leave the work unfinished, unless his omission or refusal to complete it operate as an injury or damage to the employer; in which case the damage must be deducted from the claim of the workman.3 In such a case he will be especially entitled to a compensation pro tanto, if the completion of the work be prevented by unavoidable accident, or by the fault of the employer. So, also, although the contract be entire, if it be either expressly or impliedly rescinded by the parties, the workman may recover pro tanto for the work done.4 So, also, where the workman has deviated from the contract, by doing work not contemplated therein, he will not be entitled to any compensation, although the value of the thing be thereby increased, unless there be an express or implied assent to it, and then he can recover on a quantum meruit for such additional work.5