The defendant Thalheimer is a wholesale grocer in the city of Syracuse, N. Y. In April, 1897, he received from Ferdinand H. IToffmeyer, of Chicago, fifty-two packages of butter for sale. He sold the butter and kept the proceeds, amounting to $476. Shortly afterwards the sheriff of Onondaga county attached the proceeds of the sale in an action then pending in the Supreme Court in which Newton H. Barton and G-us B. Barton were plaintiffs and said Hoffmeyer was defendant, and in which the plaintiffs therein subsequently got judgment for over $500, upon which execution was issued and placed in the hands of the sheriff, who still holds the same. Afterwards, and in May, 1897, this action, wherein the American Trust and Savings Bank is plaintiff, was commenced, and the complaint set forth that the plaintiff was the owner of the butter, but that the defendant had obtained possession of the butter, and had wrongfully disposed of the same to the said parties, receiving therefor the said sum of $476, “ which sum of money the said defendant then and there had and received to the use of this plaintiff ; ” that the plaintiff liad demanded of the defendant the proceeds of such sale, the said sum of money, and that the defendant had refused, and still refused, to deliver the same to the plaintiff, *172and the plaintiff demanded judgment for the said sum of moneys with interest, from the time of such demand; the sheriff and the parties he represented had also demanded of the defendant Tiialheimer the said sum of money. Afterwards, this defendant made an affidavit setting- forth the facts of his receiving the butter and selling it and retaining the proceeds; the attachment of the money; the several demands of the plaintiff and other parties for the same; the commencement of this action; that he had not answered therein, and stating that he was “ ready and willing to pay over * * * the * * * §476.00, with interest thereon, to the plaintiff herein, or to said sheriff and said execution creditors as soon as it shall be determined which of said parties is legally entitled thereto, and, therefore, prays that he may he permitted to pay the same into court, and that said sheriff or said execution and attaching creditors be substituted as parties defendant in this action in place of dejDonent, or that they be brought in as parties defendant with this deponent.”
Upon this and other affidavits the motion to substitute was made, resulting in the order appealed from, which provided that Oscar F. Austin, as sheriff of Onondaga county, Newton IT. Barton and Gus B. Barton be made defendants herein, and that the summons and complaint be amended accordingly, with provisions as to the service of pleadings and costs to abide event, payable out of the fund.
The affidavits disclose that the motion was made without collusion with the defendants sought to be brought in.
Upon this review the appellant insists that this action is a strictly legal action, and that the order is erroneous in providing for the bringing in of additional defendants upon the motion of the defendant 'Thalheimer, and it relies upon Chapman v. Forbes (123 N. Y. 532); Heffern v. Hunt (8 App. Div. 585).
The case first cited holds, with this contention, that an action for money had and received where a moneyed judgment only is demanded, although depending for its determination upon the question as to whether the plaintiff is ex mquo et bono entitled to the money, is a legal action, and the fact that the money came into the hands of the defendant, impressed with a species of trust to repay it to the plaintiff, does not alter the character of the action; and that a motion of the defendant, under section 452 of the Code of *173Civil Procedure, to bring in an additional defendant could not prevail. If this was the only question in the case, we should be obliged to reverse this order unconditionally, but the record seems to disclose a case entitling the defendant to an order substituting the parties sought to be brought in as defendants in the place of the defendant Thalheimer, and discharging him from liability to either of the claimants to the fund upon his paying into court the amount of the same under section 820 of the Code of Civil Procedure. That section provides that: “ A defendant, against whom an action to recover upon a contract, or an action of ejectment, or an action to recover a chattel, is pending, may, at any time before answer, upon proof, by affidavit, that a person not a party to the action makes a demand against him for the same debt .or property, without collusion with him, apply to the court, upon notice to that person and the adverse party, for an order to substitute that person in his place and to discharge him from liability to either, on his paying into court the amount of the debt,” etc.
An action for money had and received is an action upon an implied contract that the person receiving the money for the benefit of another shall pay the same to such other. Under the old system it was an action of debt and under our present system an action upon contract. (Chapman v. Forbes, supra, 535, 536.) It, therefore, comes within the provisions of section 820.
The Special Term should have granted that order substituting the sheriff and the attaching creditors in the place of the defendant who makes the application to be relieved. A case was not presented for bringing these parties in as additional defendants under section 820; that can only be done “ upon it appearing that the defendant disputes in whole or in part the liability as asserted against him by different claimants, or that he has some interest in the subject-matter of the controversy which he desires to assert.”
The defendant Thalheimer does not claim any interest in this property, nor does he dispute the right of either claimant to the fund; he is, therefore, in the position to avail himself of the privilege of paying the money into court, being relieved from responsibility and requiring the parties claiming the fund to carry on the litigation. We have the power upon this appeal to so modify the order appealed from as to reach the result which we think should *174have been obtained at the Special Term, and this is a case where such power should be exercised.
The sheriff as such is a proper party defendant, as he has attached the funds and has an interest in the result. (Simons v. Hearn, 17 N. Y. Supp. 847.)
The order of the Special Term should be so modified that Oscar F. Austin, as sheriff of Onondaga county, and Newton H. Barton and G-us B. Barton shall be substituted as defendants in the place of the defendant, Gates Thalheimer, upon his paying into court the sum in controversy, being $476, and that the action proceed against such other defendants alone; and that the defendant Thalheimer be discharged from liability to the plaintiff and to the said sheriff and other defendants, without costs to the said defendant Thalheimer, and without costs to either party upon this appeal, and that the order as so modified be affirmed.
All concurred.
Order of the Special Term modified so that it shall provide for substituting Oscar E. Austin, Newton H. Barton and Gus B. Barton as defendants in the place of Gates Thalheimer, upon his paying into court the sum of $476 to the credit of this action, which payment shall discharge him from all liability in the action, and the action shall proceed against such substituted defendants alone, without costs to the said Thalheimer, and without costs of this appeal to any party, and the order as so modified is affirmed.