The plaintiff’s claim being for the recovery of unliquidated damages arising from the defendant’s breach of his contract, the defendant, although the plaintiff might have *295been indebted to him, when the action was commenced, to an amount exceeding the plaintiff’s damages, could not have set off his debt against such damages. But the defendant’s counsel supposes that, by a recent amendment of the Code, he may avail himself of his set off. A defendant is now authorized to set up, by way of defence, any new matter constituting a counterclaim, when such counterclaim arises upon contract. The plaintiff’s action being founded upon contract, and the defendant having a cause of action also arising on contract, and the same having existed at the time the suit was brought, it would seem that the case is brought within the second subdivision of the Code as now amended.
Before the recent amendments of the Code, there would have been some difficulty in allowing the proposed defence to be inserted in the answer. By the terms of the. 173d section, the court could only allow such amendments as would not change substantially, the claim or defence. But by a very slight change in the language of the section, this restriction, which before was general, is now limited to those cases in which amendments are allowed for the purpose of conforming the pleading to the facts proved. In all other cases, I undérstand the court to be invested with the power, in its discretion, to allow “ any allegations material to the case ” to be inserted in the pleading, even though the effect may be to change entirely the cause of action or defence.
In this case, I think it may be in furtherance of justice to allow the defendant to amend his answer by inserting as a new defence his counterclaim against the plaintiff. He must be permitted to do so upon payment of plaintiff’s costs of preparing for the trial before the referee, and the costs of opposing this motion. The plaintiff will have the usual time to reply to the amended ' answer. It would have been proper, had either party desired it, to vacate the order of reference, but as nothing was said upon the subject, upon the argument of the motion, the reference may stand, but proceedings must be stayed until the new issue is completed.