The plaintiffs in this case sued to recover for lighterage and storage of grain for the defendants, about the sum of $500, and the report of the referee *429established their claim, with interest, at nearly that amount.
The defendants, admitting the lighterage and storage of a large quantity of the grain, claimed in their answer that a considerable quantity of the grain was never returned to them, but was lost or wasted or converted by the plaintiffs, and claimed that the plaintiffs should account and pay for the quantity deficient; that such amount should be applied in payment and discharge of the plaintiffs’ claim,' and the defendants have judgment for the excess.
The referee allowed most of the defendants’ claim; found that a certain portion of the grain that went into the defendants’ possession was lost by shrinkage and waste; and that nearly 1000 bushels were unaccounted for; for which quantity the referee charged the plaintiffs at the market price, with interest, amounting within five cents to the amount of the plaintiffs’ claim; for which sum of five cents the referee reported in favor of the plaintiffs. The defendants supposing themselves, under this state of facts, to be entitled to costs, taxed the same at over $100 against the plaintiffs (the plaintiffs objecting thereto) and entered judgment therefor against the plaintiffs. The plaintiffs now moved to set aside the judgment for costs, and for an order adjudging that they are entitled to costs.
I think it quite clear that the plaintiffs are so entitled. They established, at the trial, and were allowed for, a valid and subsisting claim or account against the defendants, of over $400 and nearly $500; and the defendants established, to the satisfaction of the referee, a set-off or counter-claim of over $400, and nearly $500, and within five cents as much as the plaintiffs’ demand. Both of these were subsisting and independent demands, and could have been prosecuted for as such, affirmatively, in a court of justice. There was no payment or application of either upon the other until such application was made by the referee, with the consent of the law, and of the defendants on the trial
*430of the cause. If there was any conversion or other tort, for which the defendants could have prosecuted the plaintiffs, it was virtually, if not expressly, waived hy the act of the defendants in their answer, and upon the trial, asking compensation from the plaintiffs, and the application of the amount thus obtained upon the plaintiffs’ demand. Both demands were therefore matters of account, within the meaning of section 54 of the Code, whereby a justice of the peace is excluded from entertaining jurisdiction “ where the sum total of the accounts of both parties, proved to the satisfaction of the justice, shall exceed four hundred dollars.” In this case the causes of action of each party (plaintiffs and defendants) exceeded that sum, and I can perceive no authority for saying that a justice of the peace would have had jurisdiction, unless the parties had voluntarily relinquished a portion of their demands. This it would have been unsafe for the plaintiffs to do; for the defendants, not relinquishing any portion of theirs, could have prosecuted in an independent action in a court of record, and recovered the whole amount of their demand; or, if obliged to set off in the justice’s court, must have recovered a judgment against the plaintiffs, over and above the plaintiffs’ demand, for an amount equal to the sum relinquished by the plaintiffs, as the amount of their respective claims was equal, or so within five cents. (Stilwell v. Staples, 3 Abb. 365. 5 Duer, 691. Matteson v. Bloomfield, 10 Wend. 555. Mills v. N. Y. Com. Pleas, Id. 557. Brady v. Durbrow, 2 E. D. Smith, 78. Parker v. Eaton, 25 Barb. 122. Gilliland v. Campbell, 18 How. 177.)
The case of Crane v. Holcomb, (2 Hilt. 269,) if it is to he regarded as adverse to this view, is against the weight of authority. But it was disposed of upon different considerations, and under a different statute. 1. The question arose under the act conferring jurisdiction upon the district courts of New York, (1 Laws of 1857, jp. 707,) which *431is different in language and legal effect. 2. It was decided mainly upon the effect of subdivision 4 of section 304 of the Code, which gives costs to the plaintiff, of course, in actions for the recovery of money, where the plaintiff shall recover $50, and section 305, which gives costs, of course, to the defendant, in the actions before mentioned, where the plaintiff is not entitled to costs therein.
The other cases cited by the defendants’ counsel, Trust v. Person, (3 Alb. 84,) and Peet v. Warth, (1 Bosw. 653,) are without much bearing on the present question. The first merely decides, in effect, that an action to enforce a lien, as presented by the complaint then before the court, was an action for the recovery of money, and must be determined, in regard to costs, by subdivision 4 of section 304. And the last was a case strictly within that subdivision ; at least it does not bear upon the present question.
It is upon section 305 and the 4th subdivision of section 304 that the argument of the defendants’ counsel in this case is based; and if subdivision 4 of section 304 was the only one to be considered, the defendants would be right. But the several subdivisions of that section (304) must be 'considered in connection with each other, and each must be allowed to have force. Subdivision 3 of' section 304 gives costs to the plaintiff upon a recovery (for any amount) “ in the actions of which a court of a justice of the peace has no jurisdiction.” This is an action of that kind, and- must be construed, I think, to allow the plaintiffs costs, notwithstanding subdivision 4 provides for costs to the plaintiff, in actions for the recovery of money, where he recovers fifty dollars; and section 305 gives the defendant- costs where the plaintiff is not entitled to them. There is no other way of harmonizing subdivisions 3 and .4, or of making both of them operative, but by allowing full force to subdivision 3 in all cases in which it is appli*432cable, and limiting the operation of subdivision 4 to cases which are not covered by subdivision 3.
[Albany Special Term, August 27, 1867.I have no doubt this is in accordance with the intent of the legislature, as it seems plainly to be with the weight of authority.
The plaintiffs, therefore, and not the defendants, are entitled to costs; and as the defendants have insisted upon taxing costs in their favor, and entering judgment therefor, I think the motion must be granted, with $10 costs.
Hogeboom, Justice.]