delivered the opinion of the court.
*164. Sales, § 389 * —right of recoupment for breach of warranty. Where a contract expressly provided that a balance of two hundred dollars was to be paid when an engine and generator were tested and found to be in satisfactory condition and the plaintiff failed to deliver the machine in a satisfactory condition, there was a breach of warranty on the part of the plaintiff so that under the circumstances the defendant was not required to rescind the contract and to return the machine, but had the right to recoup the damages sustained by reason of the breach in an action for the balance due on the machine.
5. Sales, § 389*—right to recoup for breach of express warranty. Where it was not denied by the plaintiff that the defendant after the receipt of a machine was compelled to expend two hundred dollars in putting the same in a satisfactory condition, and it was not disputed by the plaintiff that the repairs were proper and necessary under the warranty, if the contract contained such an alleged warranty, helct that upon finding such a warranty to exist, judgment should have been entered in favor of defendant for costs rather than in favor of plaintiff for two hundred dollars as a balance due for machinery sold and delivered on a written contract..