The opinion of the court was delivered by
Valentine, J.:
Statement of the case. This action was commenced in a justice’s court, and after judgment, was appealed to the district court. The plaintiff’s bill of particulars reads as follows:
Clay Center, Clay Co., Kas., Sept. 18, 1876.
A. Fanson, Dr. To Chas. E. Linsley:
For work and labor performed, repairing and running a steam threshing machine, from Aug. 20th 1876 to Sept. 10th 1876, 18 days’ work, at $2 per day, . . $36.00
Cr., cash,.........$5.00
Balance due,........31.00
The defendant’s amended bill of particulars, after the title, reads as follows:
I. The defendant for a first defense to the plaintiff’s bill of particulars herein, says, that he denies each and every allegation therein contained.
II. The defendant further answering says, that the cause of action of the plaintiff herein arises upon a contract for the employment of the plaintiff by the defendant as an engineer of a steam threshing-machine owned by the defendant, and that after the machine had been run for the period of eleven days during the threshing season of. 1876, by the plaintiff as its engineer, the defendant discovering a defect in the machinery of said machine determined to abandon its use, and in pursuance of such determination the defendant laid up and housed said machine; and that afterward, while said machine was laid up and housed, he [the plaintiff] took possession of said machine and ran the same for the period of three days, and that the use of said machine was worth the sum of fifteen dollars per day, amounting to the sum of forty-five dollars, for which the defendant asks judgment of the plaintiff.
III. The defendant further answering says, that the cause of action herein set forth by the plaintiff arises upon a con*237tract for the employment by the defendant of the plaintiff as an engineer of a steam threshing-machine; that during the absence of the defendant, the plaintiff, without the knowledge or consent of the defendant, took possession of the said machine, and moved it a great distance from where it was left by the defendant, so that it cost the defendant the sum of $12 to get said machine back to the place from where it was taken by the plaintiff. The defendant further says that while the plaintiff was so in possession of said machine, said machine was damaged in the sum of fifteen dollars. The defendant asks judgment against the plaintiff for said sum of twenty-five dollars.
The defendant asks judgment against the plaintiff for the sum of seventy-two dollars.
The plaintiff demurred to said second and third paragraphs, on the ground that they did not state facts sufficient to constitute any defense to the plaintiff’s cause of action, or to entitle the defendant to any relief. The demurrer was to each paragraph separately. The defendant asked the court to sustain the demurrer as to the plaintiff’s bill of particulars, but the court refused, and sustained the same as to both of said second and third paragraphs. Judgment was i’endered in favor of the plaintiff and against the defendant.
Counsel have entered into the following agreement in this case, to-wit:
“It is agreed by counsel, that all informalities and irregularities appearing herein are waived, and that the only questions herein are — First, Did the court err in refusing to carry the plaintiff’s demurrer back to and to sustain the same to the plaintiff’s bill of particulars? and second, did the court err in sustaining the plaintiff’s demurrer to the second and third paragraphs of the defendant’s bill of particulars?”
Bill of particulars; sufficiency. 2. When tort may be waived. We do not think that the court below erred in refusing to sustain said demurrer as to the plaintiff’s bill of particulars. Said bill evidently stated facts sufficient to constitute a cause of action. Facts are not stated with the same degree of elaborateness and formality in justices courts that they are in the district courts.
*2381,Set-off; imp1ied contracts. a when tort may he waived. *237We think the court below erred in sustaining said demurrer *238to the defendant's bill of particulars, or answer. The second and third paragraphs, respectively, as we think, if construed liberally, as bills of particulars filed in justices courts ought to be construed, stated facts sufficient to constitute a cause of action. And this is the oniy question said demurrer raised. But from counsel's brief we would suppose that counsel do not really wish us to decide this question only, but do wish us to decide whether both the causes of action actually set forth in said second and third paragraphs are proper subjects of set-off or counterclaim in this action. In answer to this question we would say, that we think the first cause of action stated in the defendant's bill of particulars is a proper subject of set-off in this action; but that the second cause of action stated therein is not a proper subject of either set-off or counterclaim. "In this state, any cause of action arising from contract, whether it be for a liquidated demand, or for unliquidated damages, may constitute a set-off, and be pleaded as such, in any action founded upon contract, whether such action be for a liquidated demand, or for unliquidated damages," (Stevens v. Able, 15 Kas. 584; Read v. Jeffries, 16 Kas. 534.) Also in this state, causes of action, legal and equitable, for liquidated and unliquidated damages, or for other relicf, may all be united in one action where all arise out of contracts either express or implied. (Gen. Stat. 645, § 83.) And causes of action founded upon implied contracts may be assigned so as to give to the assignee the right to revover thereon in his own name. (Stewart v. Balderston, 10 Kas. 131.) And no good reason can be given, as we think, why causes of action founded upon implied contracts may not be pleaded in set-off as we11 as any other causes of action. The statute does not attempt to confine set-off to any particular kind or kinds of contract, but leaves the matter open, so that it may be applied in all cases of contract. A set-off therefore, under the statute, may be a cause of action arising out of any kind of contract, and may be set up by the defendant in an action founded upon any like cause of action. (Gen. Stat. 649, § 98; see also Norden v. Jones, 33 Wis. 600.) The *239■cause of action set up in defendant’s second defense is really-founded upon a tort. But it is also founded upon an implied contract, at the election of the defendant. That ^ defendant may waive the tort, if he chooses, and treat his cause of action as one arising upon an implied contract. The wrong committed by the plaintiff affected his estate. It benefited the estate of the plaintiff. And it was committed for the purpose of benefiting the estate of the plaintiff. And therefore it will be presumed or implied that the plaintiff agreed to pay for such benefit. We think it is well settled, that wherever one person commits a wrong or tort against the estate of another, with the intention of benefiting his own estate, the law will, at the election of the party injured, imply or presume a contract on the part of the wrongdoer to pay to the party injured the full value of all benefits resulting to such wrongdoer. (Stewart v. Balderston, 10 Kas. 142; Tightmeyer v. Mongold, ante, p. 90, and cases -there cited.) The party injured may in such a case elect to sue upon the implied contract for the value of the benefits received by the wrongdoer, or he may sue upon the tort for the damages which he himself has sustained. According to the defendant’s bill of particulars in this case, the value of fhe use of said threshing-machine for the three days which the plaintiff used it, was $45. If this bill of particulars were true, the defendant should have recovered that amount; or rather, after setting-off one claim against the other he .should have recovered the balance due.
3. Naked trespass, not a set-off. We do not think that the cause of action stated in defendant’s third, defense is a proper subject of either set-off or counterclaim. It does not appear from such defense that the plaintiff received or expected to receive any benefit from his wrongdoing; and the relief asked for by the defendant is not for the value of any benefit resulting to the plaintiff, but is for damages sustained by the defendant. The cause of action therefore does not arise from any contract express or implied; (Tightmeyer v. Mongold, supra;) and therefore it cannot be pleaded by the defendant *240as a set-off. And said cause of action has no connection with the employment of said plaintiff by the defendant to operate, or in operating, said threshing-machine for the defendant, and hence it cannot be pleaded by the defendant as a counterclaim.
The judgment of the court below will be reversed, and cause remanded for further proceedings in accordance with this opinion.
All the Justices concurring.