By the Court,
Besnett, J.There was a special contract between the parties for the erection of a building, which was deviated from in pursuance of instructions from the defendants. The action was brought on a quantum meruit. The defendants demurred to the complaint. The demurrer was overruled, and they put in a plea to the merits. The plea was a waiver of the demurrer, and no point can be made upon that now.
At the trial, the court admitted testimony of the value of the plaintiff’s services, though there was evidence of a special con*207tract. But the contract had been deviated from, and therefore the evidence was proper.
The only question in the case, which presents any difficulty, arises upon the third instruction asked by the defendants. That was as follows:—“ If the jury believe that there was a special “ contract between the parties to erect the buildings at a speci- “ tied price, and according to an agreed plan, which was after- “ wards changed by consent, the plaintiffs are compelled to sue “ upon that special contract so far as it can be traced, and can- “ not recover upon an implied contract for work and labor, or “ for materials.”
This instruction was, however, properly refused. In such a case as this, the plaintiff can sue upon an implied contract. Indeed, should he sue upon the express contract, he must necessarily fail; because he cannot prove that the work has been done according to the terms of the contract; and he must recover, if at all,, upon an implied contract for work and labor and for materials ; though, at the trial, as the measure of compensation, the recovery must be graduated according to the terms of the contract, so far as the work can be traced under the contract. But this was not the instruction asked by the defendants. The judgment should he affirmed.
Ordered accordingly.