This action was brought by the plaintiff against the defendant upon two promissory notes, one for *693$200, dated March 10, 1908, signed by the defendant and payable to the plaintiff and the other for $650 dated March 10, 1908, signed by the defendant, payable to the plaintiff. A mortgage was also given to secure the payment of said notes. It is alleged in the complaint that the mortgage was upon an undivided one-half interest in and to a certain tract of land.
The second cause of action was set forth in the complaint wherein it is alleged that on the 10th day of March, 1908, the plaintiff was the owner of an undivided one-half interest in and to a certain tract of land, and on said date sold said undivided one-half interest in and to said property to the defendant for the snm of $1,500, and as a part of the consideration for the sale and for the purchase price of' said land McKay made and executed and delivered to plaintiff a promissory note for $300; that said $300 was not secured in any way other than by the said personal obligation of McKay; that the note has not been paid and plaintiff claims a vendor’s lien upon the undivided one-half interest in the property.
For a third cause of action the plaintiff alleges that on the 10th day of March, 1908, the plaintiff sold to the defendant an undivided one-half interest in said property; that the plaintiff is unskilled in the manner of transferring real property or the making of contracts and did not know at the time the proper manner of making a deed; that at said time the plaintiff sold an undivided one-half interest in and to the property for $1,500, and the defendant as a part of the consideration for the sale assumed and agreed to pay a certain mortgage then outstanding against the property, dated March 11,1904, and made and executed by plaintiff and N. K. Wollan upon said property for the sum of $1,000, upon which there had been paid $500 and interest; and that the defendant McKay was familiar with the procedure and forms of deeds and conveyances for the transfer of property and prepared the deed for the plaintiff to sign, and that at that time plaintiff requested McKay to insert in the deed the exception and assumption of said mortgage as a part of the consideration *694for the transfer, but that McKay, although agreeing to pay the mortgage indebtedness and assume the same as a part of the obligation and transfer of the land, falsely and fraudulently informed the plaintiff that it was unnecessary to put the exception and assumption of the mortgage in the deed, and that as long as the same was understood it need not appear in the deed, but agreed that he would pay the mortgage to the amount of $500 and interest as a part of the consideration for the transfer; and that the plaintiff, believing him, signed the deed without the exception, although it was understood that the defendant was to assume the mortgage and pay the same, and that he would not have signed the warranty without the exception except for the-false representations and statements.
Prayer was made for foreclosure of the mortgage securing the two notes with interest, and costs and attorneys’ fees, and that a decree be made for the sale of the premises, and that the property described be subject to a vendor’s lien in favor of the plaintiff for the sum of $300, and that the property be sold to pay the same. The plaintiff further prays that the plaintiff have decree correcting and inserting in the deed the following: “Subject to the mortgage given by the plaintiff and N. R. Wollan to Charles Gifford for the sum of $1,000 dated March 11, 1904, and recorded in Book 1 of mortgages on p. 506 of the records of Kootenai county, Idaho, and upon which there is now due the sum of $500 with interest.”
A demurrer was filed to the complaint and overruled. The defendant filed an answer and denies the allegations of the complaint except those specifically admitted, qualified or explained. And then follows an admission of paragraph 1 of the complaint. Paragraph 1 alleges the execution and delivery of the two notes sued on. The defendant admits the allegations of paragraph 2 of plaintiff’s complaint. This is that the two notes were a part of the purchase price of a one-half interest in the property described in the complaint. The defendant admits paragraph 3 of the plaintiff’s complaint that the mortgage was executed as security. The defendant *695admits paragraph 4 of plaintiff’s cause of action, except that the defendant denies any demand for payment. The defendant also admits paragraph 5 of the first cause of action, that the mortgage was on an undivided one-half interest. The defendant also admits paragraph 1 of the plaintiff’s second cause of action, except he denies that the property was sold to him for $1,500, and alleges the fact to be that the consideration was $1,150. The defendant also admits paragraph 2 of the second cause of action, except that the defendant denies that no part of the said note has been paid, and alleges the fact to be that $185.25 has been paid; and admits all of paragraph 1 of plaintiff’s third cause of action. Then follows a very lengthy allegation as to paragraph 2 .of plaintiff’s third cause of action, and defendant denies that the plaintiff is unskilled and unfamiliar with the transfer of property or making of contracts, or that he did not know the proper manner of making a deed of conveyance in order that it may express truthfully the agreement, or that the plaintiff sold said undivided one-half interest for $1,500; or that the defendant as part of the consideration assumed and agreed to pay a certain mortgage then outstanding against the property, dated March 11, 1904, and executed by plaintiff and N. R. Wollan on the property for the sum of $1,000, upon which was then due $500 and interest, or that said defendant McKay was familiar with the procedure and forms of deeds or conveyances for the transfer of property, or that McKay agreed to pay the mortgage indebtedness or assume the same, and practically denies all the allegations made in the three causes of action in relation to the mortgage and as to who assumed it and was to pay the same; and further answering the complaint the defendant alleges that on the 10th day of March, 1908, P. A. Wollan and N. R. Wollan were joint equal owners of the property described, being the property sold and mortgaged as described in the complaint; that P. A. Wollan, on the day last aforesaid, for consideration delivered to defendant a warranty deed of an undivided one-half interest in the property, which deed is made a part of the allegation; defendant also alleges the execution of the mortgage by P. A. Wollan and *696N. R. Wollan to Gifford, and such mortgage is made a part of the answer. Then follows an allegation that at the time the plaintiff executed said warranty deed to defendant it was agreed by and between plaintiff and defendant that the plaintiff would pay said outstanding mortgage when it became due, but that said plaintiff did not so pay said mortgage; that Gifford assigned the mortgage to E. S. Burgan; that Burgan foreclosed upon the property on the 5th day of May, 1910, and on the 28th day of May, 1910, under a certificate of sale and decree of foreclosure the property was sold to P. A. Wollan, and a certificate of sale issued and delivered, and that defendant was forced to pay and did pay in redeeming from said foreclosure the sum of $687.50; that the said plaintiff or N. R. Wollan have not either of them repaid to this defendant any sum whatever; that the defendant relied and acted upon the plaintiff’s promise to pay the Burgan mortgage and upon the warranty .in the deed,, and expended and caused to be expended in the improvement of said premises the sum of $5,307, and that said premises are now of the value of $7,000; that by reason of the breach of warranty of the deed the defendant has been damaged in the sum of $5,000; that upon the execution and delivery by P. A. Wollan to the defendant of a warranty deed and the execution and delivery of the notes and mortgage by the defendant to P. A. Wollan, it was agreed by and between this defendant and N. R. Wollan that they should organize a corporation for the purpose of erecting improvements on the premises, a green-house, and conducting and operating the same, and that during the organization N. R. Wollan and defendant should conduct business as partners, and that the business was so conducted until the wrongful and unlawful forming of the conspiracy; that said corporation was never organized, but that said proposed corporation project was wrongfully and unlawfully prevented from being consummated. Then follow allegations that by virtue of the agreement between N. R. Wollan and the defendant to organize a corporation and build and operate a green-house, the defendant with knowledge and consent of N. R. Wollan, expended $5,080.50, and no part of said sum has *697been paid by Wollan, nor anyone in his behalf, with the exception of $56.43; and that there is owing on said improvements an additional sum of $227.15, and a judgment in favor of Brick Johnson for $81.15; and that plaintiff and N. R. Wollan unlawfully and wrongfully conspired to obtain possession of the property and wrongfully deprive and oust the defendant and drive him away from the same, and in pursuance of the conspiracy they unlawfully prevented the organization of the corporation, made false and derogatory statements in regard to the ability of the defendant and to his competency to run the green-house, and Wollan refused to continue the partnership agreement and instituted action for a partition of the premises, and entered on the property and put locks on the house, and by threats of bodily injury endeavored to prevent his entrance; that goods, furniture and papers of the defendant were wrongfully thrown from the house and destroyed and creditors of the defendant were wrongfully and unlawfully induced and prevented from bidding against each other at the sheriff’s sale of said premises, and at the sheriff’s sale of personal property of said premises a partition was partially torn down in the house, all of which acts were wrongfully and unlawfully done without sanction of the defendant and to his damage in the amount of $5,000.
The prayer of the defendant was, 1st, that the plaintiff take nothing and that the notes and mortgage to plaintiff be canceled; 2d, that the defendant be awarded damages against plaintiff for breach of warranty as alleged in the first offset or counterclaim in the sum of $5,000; 3d, that the defendant be awarded damages against plaintiff for wrongful and unlawful injury as alleged in his second counterclaim or offset, in the amount of $5,000; 4th, that the defendant be awarded costs and disbursements and other equitable relief.
We find in the record that a motion was made in the district court to strike from the defendant’s answer and counterclaim certain portions of the same, and a motion was also made to strike from the answer all the defendant’s- second setoff and counterclaim, specifying the particular paragraphs of the same. The trial court in ruling upon said motions *698ordered that all of that part of paragraph 4 of defendant’s affirmative defense, setoff and counterclaim, beginning with the word “that” on line 13 of said paragraph 4 and continuing down and including the balance of said paragraph 4 and all thereof, and also including all of paragraph 5 thereof and all of paragraph 6 thereof; and also all of the second or further answer, setoff and counterclaim, including paragraphs 1, 2, 3 and 4 thereof, and each and every part thereof, be stricken from the defendant’s answer.
Thereafter the plaintiff moved the court that upon the determination of the plaintiff’s motion to strike, that judgment upon the pleadings be granted herein for plaintiff and against the defendant upon the ground, 1st that no sufficient answer or defense to either the plaintiff’s first or second cause of action has been made or filed herein by defendant; 2d, that the amended answer filed herein by the defendant does not show any good or sufficient defense to plaintiff’s first or second caiise of action, and by said amended answer and pleadings herein the facts as admitted show that plaintiff is entitled to a decree of this court as prayed for on his first and second cause of action. And for the purpose of the motion onlyj and for no other reason, the plaintiff admits the allegations of paragraph 8 of the defendant’s amended answer and agrees that said sum therein specified may be credited upon said note, and this admission is made without prejudice.
The trial court in the judgment states: This cause having heretofore come on for hearing, upon the plaintiff’s motion for judgment upon the pleadings on the first and second causes of action filed herein, plaintiff, for the purpose of said motion, admits the allegations of paragraph 8 of defendant’s answer and agrees that the sum therein specified, to wit, the sum of $185.25, may be credited upon the note set forth in plaintiff’s second cause of action; and the court having duly considered the plaintiff’s motion for judgment on the pleadings, and being well and fully advised in the premises, finds that the defendant’s amended answer does not set forth or constitute any defense to the matters and things alleged in the first and second cause of action of plaintiff’s complaint, and *699by reason thereof said motion should be granted and judgment rendered in favor of the plaintiff and against the defendant upon the pleadings, foreclosing the mortgage alleged in the first cause of action of plaintiff’s complaint, and also foreclosing the vendor’s lien alleged and set forth in the second cause of action in plaintiff’s complaint, subject to said setoff of $185.25; and the court further states that due service has been required of all the parties to said action, and that both of said parties have appeared and the court has jurisdiction of the parties and subject matter; and after considering said motion and the evidence introduced which was sufficient to enable the court to render judgment, it appears to the court from the pleadings and the evidence that there is due, owing and unpaid to the plaintiff from the defendant upon the promissory notes — then the court sets out the amount found for the plaintiff; it is also stated in the judgment that the plaintiff is the owner and holder of the notes and mortgages sued on, and is entitled to a decree foreclosing the mortgage and is entitled to sell the defendant’s undivided one-half interest in the property; the court also finds that plaintiff is entitled to a vendor’s lien on the property described for the further sum of $115, with interest, and is entitled to foreclose said vendor’s lien against the property, and it is decreed that the property be sold according to law. The appeal is from the judgment.
The assignments of error are as follows: The court erred in overruling defendant’s demurrer to plaintiff’s complaint, and the three causes of action therein stated. Counsel assigns several errors which relate to the court’s ruling upon the motion to strike parts of the defendant’s answer and counterclaim. Error 6 is based upon the court’s ruling upon the motion for judgment on the pleadings. Error 8 is that the court erred in entering judgment on the pleadings in favor of the plaintiff against the defendant on plaintiff’s first cause of action. Error 9 is that the court erred in entering judgment on the pleadings in favor of the plaintiff against the defendant on plaintiff’s second cause of action. Error 10 is that the court erred in entering judgment in favor *700of the plaintiff on the second cause of action in the amount of $115.
The record shows that the trial court, upon motion of plaintiff, struck out certain allegations of the defendant’s answer. At the time the motion was sustained the plaintiff admitted that there was a credit due defendant of $185.25 which was claimed by the defendant, and this was credited upon the $300 note sued upon. This being admitted and agreed to, there was due plaintiff upon the first cause of action, and the court so found, $1,351.90; and the court also found that there was due on the second cause of action $115, and granted a decree of foreclosure of the vendor’s lien and ordered the property sold to satisfy the liens and the mortgage.
It is also proper to call attention to the facts that the denials in the answer are not sufficient to present any issue as to the material allegations of the first and second cause of action, and the court made findings and rendered judgment accordingly. It is therefore unnecessary to consider any question arising out of the plaintiff’s right to recover upon the first and second cause of action, as found by the trial court, and for which judgment for the amount found was entered.
This leaves for consideration the questions: 1st, breach of warranty as alleged in the first offset or counterclaim in the sum of $5,000; 2d, wrongful and unlawful injury as alleged in the second counterclaim in the amount of $5,000.
As to the first question: The answer alleges that on the 10th of March, 1908, P. A. Wollan and N. R. Wollan were joint and equal owners of the land described in the complaint; that plaintiff P. A. Wollan on that date executed, acknowledged and delivered to defendant a warranty deed conveying to defendant an undivided one-half interest to the property involved; that this deed was acknowledged and certified and recorded; that at the time said conveyance was made there was recorded in the records of Kootenai county a mortgage executed by P. A. Wollan and N. R. Wollan to one Charles Gifford covering the lands involved, which mortgage was a valid lien on said premises; that at the time the deed was *701executed it was agreed by and between plaintiff and defendant that the said plaintiff would pay said outstanding mortgage when it became due, but that said plaintiff did not pay the mortgage; that Gifford assigned the mortgage to E. S. Burgan and the assignment of the mortgage was recorded and that on May 5, 1910, Burgan foreclosed the mortgage and on the 28th of May, 1910, under a certificate of sale and decree of foreclosure the property was duly and regularly sold to P. A. Wollan by the sheriff and the certificate of sale filed in the recorder’s office on June 9, 1910; that the defendant was forced to pay and did pay in redeeming said foreclosure the sum of $687.50; that the plaintiff or N. R. Wollan has not, nor has either of them, repaid the defendant any sum or amount for said redemption; that defendant, relying and acting upon said plaintiff’s promise to pay Burgan, the assignee of the mortgage, and upon the warranty in said deed, expended and caused to be expended in the improvement of said premises the sum of $5,307, and that said premises are of the value of $7,000; that by reason of the breach of warranty of the above deed as well as the foreclosure and sale of the property the defendant has been damaged in the sum of $5,000.
The allegations in the answer put in issue the allegations made by plaintiff, that at the time the deed was- executed by plaintiff to the defendant it was agreed prior to the execution that defendant purchased the property “subject-to the mortgage given by 'the plaintiff and N. R. Wollan to Charles Gifford for the sum of $1,000, dated March 11, 1904 .... upon which there is now due the sum of $500 with interest, ’ ’ which agreement was omitted from the deed upon the representations of the defendant that it might affect the defendant’s credit, and that such omission was agreed to by the parties to the instrument, and that such agreement was known by McKay.
We think there is no doubt but that such a question may be presented in an action brought upon the notes executed as purchase money and secured by mortgage upon the property sold, which was previously mortgaged to a party other than *702the plaintiff; and in such an action where such facts are made a part of the cause of action upon the notes executed as purchase money and the foreclosure of the mortgage securing the notes, and it is alleged that said previous mortgage had been foreclosed on account of nonpayment at maturity, and that defendant had been compelled to pay the same, such allegation constitutes a part of the cause of action instituted for the purpose of recovering on the purchase money notes and the foreclosure of the mortgage, where it is alleged in the complaint that an agreement was entered into, referring to the sale of real property for which the promissory notes were executed as purchase money and secured by mortgage upon the property sold, that the purchaser would pay the previous mortgage existing at the time of the sale and the execution of the promissory notes and mortgage by such payment.
The plaintiff certainly was damaged to the extent he was compelled to pay for redeeming the property. If these facts were true, such facts should be considered in determining how much was due in this case to the plaintiff.
There can be no question but that where a party agrees to sell and convey to another party real property and the purchaser assumes and agrees to pay a mortgage upon said property executed before the contract of sale is entered into, and thereafter a deed is executed conveying the property, and the condition of payment of the mortgage existing before the time the contract and deed are made was omitted from the deed by agreement of the parties, for the reason that it might affect the credit of the party who agrees to pay the mortgage, the omission of the contract to pay from the deed was a fraud upon the party making the sale, and may be reformed by inserting the omission in the deed upon alleging the facts. (2 Devlin on Real Estate, sec. 1049; Kilmer v. Smith, 77 N. Y. 226, 33 Am. Rep. 613.)
In the latter case the court says: “The deed was to be drawn in pursuance of the contract, and to carry out the bargain therein expressed. It is plain that the deed goes much beyond the contract, and imposes upon the plaintiff an obligation not suggested or warranted by the terms of the *703agreement. It is also apparent from the contract that at the time of its execution both parties understood the difference between a conveyance, subject to a mortgage, and one with an agreement to assume and pay the mortgage. To warrant the imposition of such an obligation upon the plaintiff, required a new agreement, or at least an assent on his part. .... The case is not to be regarded as one of mutual misunderstanding or mistake, but rather as a case where one party deliberately inserted in a deed a covenant tending to his own advantage and another’s prejudice, and the latter, in ignorance that the instrument contains the covenant, accepts it as in fulfillment of a contract which requires no such stipulation. The denial of relief in such a case would be at variance with long-established doctrines of courts of equity, and a reproach to the law itself. (1 Story, Bq. Jur., par. 138e.) It has therefore been held that the ignorant party is entitled to relief, notwithstanding the other acted advisedly and upon full information, for that being admitted, there is fraud.”
That case is exactly in point with this case, with this distinction: In the Kilmer v. Smith case the contract was made and the deed was to be carried out according to the contract. When the deed was made provisions were inserted by the grantee which were not agreed to by the terms of the agreement. In the present case the contract was made and the deed was drawn by the grantee, and at his request, for his own personal reason and benefit, which was no benefit to the grantor, but a great injury, the grantee omitted the assumption and agreement to pay the mortgage, and omitted that part of the agreement from the deed. If these facts be true, certainly the deed should be reformed according to the contract, and the denial of such relief would be at variance with the law and equity as recognized by the authorities. A number of cases are cited supporting this doctrine.
The court, therefore, was in error in striking such allegations from the answer.
According to the allegations of defendant’s answer, said counterclaim or offset arose out of the transaction in which the said promissory notes and mortgage were given, and *704under the provisions of said statute is connected with the subject of the action and affects the real estate to which the action relates.
In Stoddard v. Treadwell, 26 Cal. 294, it is held that where the claim of plaintiff and counterclaim of defendant both arise out of the same contract, defendant may introduce evidence of unliquidated damages embraced in his counterclaim, unless the plaintiff come to the contract by assignment.
Setoff is defined in Black’s Law Dictionary as a counterclaim or cross-demand; and the same author defines counterclaim as a species of setoff or recoupment introduced by the codes of eivil procedure in several of the states, of a broad and liberal character.
In 1 Sutherland, Code PL, Pr. and Forms, at sec. 631, the author discusses unliquidated demands and says:
“A counterclaim is shown to be more comprehensive than the old setoff, in that the latter could not be resorted to in an action to recover unliquidated damages, — that is, damages which could not be ascertained by mere calculation without the intervention of a jury. But in order to be available as a counterclaim, however, damages need not be liquidated. The code provision that a counterclaim may embrace a cause of action arising out of the transaction set forth in the complaint or connected with the subject of the action, or in an action upon contract, any other cause of action arising also upon contract is all-inclusive, and it is immaterial that the cause of action may be for an unliquidated debt.”
In see. 635 the author says: “There is no reason why a cause of 'action in tort or upon contract may not be counterclaimed in a suit either upon tort or contract, if both causes of action arise out of the same transaction, or are connected with the subject matter of the action.”
In Niver v. Nash, 7 Wash. 558, 35 Pac. 380, after quoting the provisions of the Washington statute, which are substantially the same as subd. 1, sec. 4148, Kev. Codes of Idaho, the court said: “It will be seen from this provision that as to a cause of action arising out of the same contract or transac*705tion, there is no distinction whatever between liquidated and unliquidated damages.”
In Van Epps v. Harrison, 5 Hill, 63, 40 Am. Dec. 314, in the note to that ease on p. 325, Judge Freeman says: “It is well settled that unliquidated damages, growing out of the same transaction from which the plaintiff’s cause of action arises, may be recouped.”
In Pomeroy’s Code Remedies, 4th ed., at see. 674, referring to unliquidated damages as a counterclaim, it is said:
“A few early cases lay down a different doctrine, and require the damages to be liquidatéd so that they would constitute a good setoff under the ancient rules; but these decisions are palpably erroneous, and are completely overruled.”
In Wyman v. Herard, 9 Okl. 35, 59 Pac. 1009, it is held not to be necessary that a counterclaim be founded or arise out of a contract set forth in a petition or complaint; if it arises out of the transaction or is connected with the subject of the action, that is sufficient.
In Waite v. Wheeler & Wilson Mfg. Co., 23 Or. 297, 31 Pac. 661, referring to the statute of that state on counterclaims, the court said:
“But statutes of this kind should be construed liberally, to the end that all controversies between parties may be adjusted in a single action in all cases coming fairly within the terms of the statutes, and, so construing our statute, we are of the opinion that any cause of action in favor of defendant and against the plaintiff arising out of the contract or transaction between the parties, of which the promissory note set out in the complaint is but the evidence, can be said to arise out of the contract or transaction upon which plaintiff’s action is based, and may be set up as a counterclaim to an action on the note. ”
This court held in Willman v. Friedman, 4 Ida. 209, 95 Am. St. 59, 38 Pac. 937, that damages arising from the wrongful issuance of attachment is a proper matter for a cross-complaint. (Miller v. Hunt, 6 Ida. 523, 57 Pac. 315.)
It appears from the allegations of the complaint that the plaintiff, P. A. "Wollan, and one N. R. Wollan were the owners *706of the land involved in this action; that P. A. Wollan sold to the appellant an undivided one-half interest in said land and then began a conspiracy to defraud and swindle the defendant out of said land and out of the improvements that he might place thereon of the value of about $5,000, and the issue raised by the defendant in regard thereto ought to be determined in this action. The alleged conspiracy and fraudulent acts affected the property to which this action relates and are connected with the land involved in this transaction.
A new trial will be granted and the trial court directed to determine (1) the amount due on said promissory notes, and (2) as to whether said deed should be reformed as prayed for in the complaint, and (3) the amount of damages, if any, sustained by the defendant because of the alleged unlawful acts of Wollan.
The judgment of the trial court is reversed and the cause remanded. Costs awarded to appellant.
Ailshie, C. J., and Sullivan, J., concur.