#### CHRISTOPHER WILLOVER, Appellant, *v.*THE FIRST NATIONAL BANK OF OLEAN, Respondent.

Counter-claim— *when a claim, cannot he used as*— *when not available under subdivision*3 *of section*502 *of the Code of Oivil Procedure.*

The complaint alleged that one Phelps acted as an attorney for one Alexander, both in an action in which Alexander recovered a judgment against one Funk, and also in a subsequent action, brought unsuccessfully by Funk, to restrain its collection; that before the second action was determined the first judgment was-assigned to the defendant by Alexander, subject to the claim of Phelps for his compensation; that after the determination of the second action Phelps-assigned to the plaintiff his claim against Alexander for services in that action, together with his lien upon the judgment; that the parties being unable to-agree upon the amount of Phelps’ claim submitted the matter to arbitration and agreed to abide by the award, and that the amount awarded -should be paid to the plaintiff out of the judgment; it further set forth the making of the award *185and its amount, the subsequent receipt of the amount of the judgment by the defendant, the payment by it of a part of the plaintiff’s claim and its refusal to pay the balance.

The defendant set up as a counter-claim that prior to the assignment to the plaintiff the assignor Phelps was indebted to the defendant for an overdraft, and that the alleged assignment to the plaintiff was merely nominal, without consideration, and made and accepted with the fraudulent purpose of enabling Phelps to take the proceeds, exempt from the claims of his creditors, and particularly of the defendant.

*Held,*that the complaint set forth facts sufficient to constitute a cause of action. That the indebtedness of Phelps to the defendant, existing at the time of his-assigning his claim against Alexander to the plaintiff, was not the subject of a set-off or counter-claim as against the plaintiff.

That the plaintiff was not a trustee for Phelps, nor was the action brought for his benefit so as to render the indebtedness of Phelps to the defendant available-as a counter-claim under the provisions of subdivision 3 of section 502 of the-Code of Civil Procedure.

Appeal by the plaintiff from an interlocutory judgment, entered' upon the decision of the Cattaraugus Special Term, overruling-a demurrer interposed to an alleged counter-claim of the answer.

The complaint alleges that one Phelps was attorney and counsel for one Alexander in an action brought by him against one Punk, in which a judgment was recovered against the latter for $1,752.42: damages and eosts; that Punk then brought an action against Alexander in equity to restrain the collection of the judgment, and gave-an undertaking, executed by sureties, to pay the amount of the-judgment in the event of failure to obtain the relief prayed for in the complaint; that Phelps was attorney and counsel for the defendant Alexander in that action, and the complaint was dismissed, but. before the action was determined Alexander assigned to the defendant the judgment and so much of the undertaking as secured its-payment, so that the “ defendant became the owner of said judgment, damages and costs, and all securities, * * * subject only to the claim of said Phelps for his compensation for services rendered ” for Alexander; that after the determination of the equity action Phelps assigned to the plaintiff his claim against Alexander for services in that action, together with his lien upon the fund therefor; that thereupon the parties, being unable to agree upon the amount to which the plaintiff was entitled for the services of Phelps, submitted the matter to an arbitrator, and agreed *to*
      *186•abide by the award, and “ that the amount awarded should be paid to the plaintiff out of the judgment and funds so assigned by Alexander to the defendant; ” that the arbitrator awarded the plaintiff $535 “for the services in said equity case;” that the defendant received from the sureties in the undertaking the amount of the judgment, and holds it by virtue of the assignment to it; that only $440 of the award have been paid, and there yet remains due ninety-live dollars, for which the -defendant is indebted to the plaintiff, for which he asks judgment. The defendant, by the second count of the answer, alleges that prior to the time of the alleged assignment to the plaintiff, his assignor, Phelps, drew his check upon the defendant for fifty-six dollars and -thirty-seven cents, and by it obtained from the latter that amount when he had no funds with the defendant to pay it, whereby he became indebted to the defendant for that sum; that the alleged assignment to the plaintiff “ was merely nominal, without consideration, and made and accepted with the fraudulent purpose of enabling Phelps to take * * * the proceeds * * * exempt from the claim of his creditors and particularly the defendant.”

The plaintiff demurred to the counter-claim set up in the second ■count of the answer, on the ground that it does not state facts sufficient to constitute a cause of action. The demurrer was overruled and the plaintiff appealed.

*Geo. Id. Phelps,*for the appellant.

*J. JEd. Waring,*for the respondent.

Bradley, J. :

The facts, as alleged in the complaint, may be deemed sufficient to establish a lien in behalf of Phelps upon the fund represented by the judgment against Punk, for the value of his services as attorney and counsel for the defendant’s assignor in the action brought to restrain its collection, and in that view it may be assumed that the submission for arbitrament of the question of the value of such services was had.

The assignment by Phelps to the plaintiff, as alleged in the complaint, was of a claim against Alexander for services, together with his lien upon the fund as security for its payment, and did not pur*187port to transfer any claim due the assignor from the defendant. But the judgment and the securities for its payment having been assigned by Alexander to the defendant, the latter had some interest in the matter of the amount of the lien upon the fund. And the plaintiff, from the assignment to him, derived the right to charge it fey action in equity, to which the defendant would have been a necessary party. But at the time of the assignment to the plaintiff, Phelps had no claim or right of action at law against the defendant which was transferred by it. And the defendant had no right to set-off or assert, by way of counter-claim as against the plaintiff as assignee, the debt it then had against Phelps. The right to do so is dependent upon the statute, which provides that *“*if the action is founded upon a contract which has been assigned by the party thereto, * * * a demand existing against the party thereto * * * at the time of the assignment thereof, and belonging to the defendant, * * * must be allowed as a counter-claim * * * if it might have been so allowed against the party * * * while the contract belonged to him.” (Code Civ. Pro., § 502, sub. 1.)

The contract before and at the time of the assignment was between Phelps and Alexander, and no right of set-off then existed with the defendant against the plaintiff’s assignor affecting the claim assigned, and, therefore, the claim derived from the assignment by the plaintiff was in no manner taken subject to any right of the defendant to make the set-off. And in this respect the provision of the Code is substantially the same as the prior statute. (2 R. S., 354, § 18, sub. 8; *Myers*v. *Davis,*22 N. Y., 489; *Martin*v. *Kunzmuller,*37 id., 396; *Taylor*v. *Mayor, etc.,*82 id., 10.) This action and the right to maintain it depend upon a contract of the defendant, express or implied, made since the assignment to the plaintiff, and accruing to him as such assignee. But it is contended on the part of the defendant that the complaint does not state a cause of action against the defendant. If that is so, the plaintiff’s demurrer to the answer was properly overruled, without reference to the question of the sufficiency of the alleged counter-claim. *(People*v. *Booth,*32 N. Y., 397.)

The complaint alleges the assignment of the judgment to the defendant; the lien of Phelps upon the fund represented by it, on *188account of bis claim for services as attorney and counsel against tbe defendant’s assignor; tbe assignment of tbat claim to tbe plaintiff; tbe agreement between bim and tbe defendant to submit tbe matter of tbe claim to arbitration to ascertain its amount in wbicb it was agreed tbat tbe amount awarded should be paid to tbe plaintiff out of tbe judgment and funds so assigned to tbe defendant; tbe making the award and its amount, and tbe subsequent receipt by tbe defendant of tbe amount of tbe judgment, etc. These facts are sufficient to furnish a claim and cause of action in favor of tbe plaintiff against tbe defendant. And for tbat purpose it is not necessary now to determine whether or not tbe allegation is sufficient to constitute an express agreement of tbe defendant to pay the amount to tbe plaintiff. Tbe alleged agreement of tbe defendant, tbat it should be paid out of the particular fund to tbe plaintiff in view of tbe purpose of tbe arbitration and award, was a recognition by tbe latter tbat tbe plaintiff had tbe right to the amount of tbe award established by it from tbe proceeds of tbe judgment. And tbe fact that tbe defendant afterward received tbe fund was sufficient to permit recovery of tbe amount, as for money bad and received by tbe defendants to and for tbe use of tbe plaintiff. In tbe view taken of the question here, tbe result must be tbe same whether the'right of action rests upon that ground or upon an express agreement of tbe defendant to pay tbe plaintiff from tbe proceeds of tbe judgment the amount of the award.

Tbat part of the answer alleging tbe matter of counter-claim is not sufficient to support tbe defendant’s claim against tbe plaintiff as assignee, unless the allegations of tbe answer place tbe plaintiff’s assignor in such beneficial relation to the subject of the action as to justify it. The answer in question alleges “ tbat at the time of tbe alleged assignment to tbe plaintiff, set forth in tbe complaint of tbe cause of action therein set forth, Phelps was indebted to tbe defendant,” etc. This is adopted as tbe basis upon which tbe right to charge tbe countei-claim against tbe cause of action and assignment as alleged in tbe complaint is asserted. Then tbe answer proceeds to allege that tbe assignment to the plaintiff was *“*merely nominal, without consideration, and made and accepted for the benefit of said Phelps, and with tbe fraudulent purpose of enabling said Phelps (under *189cover thereof) to take hold, use and appropriate the proceeds of such award free and exempt from the claims and demands of the creditors of said Phelps and particularly this defendant.” The question arises whether this allegation brings the case within the statute, which provides, “ if the plaintiff is a trustee for another, or if the action is in the name of a plaintiff who has no actual interest in the contract upon which it is founded, a demand against the plaintiff shall not be allowed as a counter-claim, but so much of a ■demand existing against the person whom he represents, or for whose benefit the action is brought as will satisfy the plaintiff’s demand, must be allowed as a counter-claim, if it might have been so allowed in an action brought by the person beneficially interested.” (Code Civil Pro., § 502, sub. 3.)

This right of defense, founded in set-off or counter-claim as it is now defined as against an assignee, is wholly statutory. *(Wheeler*v. Raymond, 5 Cow., 231.) And the allegation in support of it must in express terms bring such defense within the statute. .We think that is not done in this case. It is neither alleged that the plaintiff was trustee for Phelps, or that the plaintiff had no interest in the subject of the action within the meaning of the statute. In matters of pleading nothing will be inferred, but all elements requisite to the cause of action or defense must be alleged.

The purpose of the assignment to the plaintiff, as distinguished from its legal effect, is not important for the purposes of this question in this action at law. Whether, within the meaning of this statute, the plaintiff was a trustee or had no interest in the subject-matter, of the action, depended upon the legal effect of the assignment to him as between the parties to it.

The intent of the parties is not the ■ subject of inquiry. The plaintiff may have the legal right as against his assignor to the entire subject of the cause of action, and yet the assignment be held fraudulent as to the creditors of the latter in a proper action for the purpose, by reason of some understanding that the assignor shall have some of the benefit to be derived,from it, the trust in such case is not created by the instrument, but is adjudged by the court as the result of fraud for the purposes of the remedy in behalf of creditors, that question cannot be raised in this action for the purpose of the alleged counter-claim.

*190The allegations in the answer do not necessarily go to the terms or legal effect of the assignment, but may relate only to the purpose and intent of the-parties in making and taking it. For aught that appears by the allegations of the answer the assignor has no legal interest or right which he can assert against the plaintiff to any part of the subject of the action.

It is unnecessary to consider the question which might have been presented, if it had appeared by the pleadings, or been alleged by the answer, that the money was received by the defendant upon the judgment prior to the assignment by Phelps to the plaintiff. If these views are correct, the defendant has faffed to allege facts sufficient to constitute a counter-claim or set-off, and the demurrer was well taken.

The recovery of costs of the demurrer and of this appeal by the plaintiff must await and depend upon the defeat of the defendant upon ,the issues of fact. If the latter prevails, then the plaintiff will not be entitled to recover such costs. *(Masters*v. Barnard, 6 How., 113; *Belknap*v. McIntyre, 2 Abb., 366; *Mora*v. *Sun Mut. Ins. Co.,*13 id., 304-308 ; S. C., 22 How., 60.)

The judgment should be reversed, with leave to the defendant to amend answer within twenty days on payment of costs.

Smith, P. J., Baeeee and Haight, JJ., concurred.

Interlocutory judgment reversed and demurrer sustained, with leave to the defendant to amend answer within twenty days on payment of the costs of the demurrer and of this appeal, and in case the defendant does not elect to amend, that the plaintiff recover such costs in case he succeeds in the action.