#### E. I. DONOVAN v. W. B. DICKSON et al.

(164 N. W. 27.)

Land — contract for sale of — warranty deed —action to cancel contract — restoration of everything of value — received under contract — offer to restore — unable to place each other in same position — refusal to do so.

1. Where one brings an action to cancel a contract for the sale of certain land and the warranty deed given in pursuance of such contract, he must restore to the other party everything of value which he has received from him under the contract, or must offer to restore the same upon condition that such party shall do likewise, unless the latter is unable or absolutely refuses to do so.

Mortgage lien — action to foreclose — Statute of Limitations — when begins to run against.

2. An action to foreclose a real estate mortgage lien is not barred by the Statute of Limitations until ten years have expired from the date when such mortgage becomes due.

Equity — payment of purchase price —action to determine — whether same has been paid — entry of judgment — date of — Statute of Limitations — begins to run from.

3. Where an action in a court of equity is necessary to determine whether or not a party who has paid a portion or all of the purchase price of a tract of land has a lien upon such land for such purchase price, the Statute of Limitations would not commence to run until the termination of such action and the entry of final judgment therein.

Opinion filed July 9, 1917.

Appeal from tbe District Court of Cavalier County, *C. M.*Cooley, X

Affirmed.

*Thomas Devaney*and *W. B. Diclcson,*for appellants.

A judgment or decree is *res judicata*pending an appeal. No proceedings under a judgment or decree shall be stayed unless supersedeas bond is filed, and no appeal or stay shall vacate or affect such judgment or order. Watson v. Bichardson, 110 Iowa, 698, 80 Am. St. Bep. 331, 80 N. W. 416, and cases cited.

The debtor upon whom rests the ultimate obligation to discharge the debt cannot by his payment acquire any right of subrogation. A *405purchaser cannot be subrogated to the benefit of an encumbrance which he has agreed to pay. Birke v. Abbott, 103 Ind. 1, 53 Am. Rep. 474, 1 N. E. 485; Sheldon, Subrogation, § 46; Pom. Eq. Jur. § 1016, and note; Carlton v. Jackson, 121 Mass. 592; Willson v. Burton, 52 Yt. 394; Heim v. Yogel, 69 Mo. 529; Harris, Subrogation, pp. Ill, 112, §§ 151, 815, and notes; Guckenheimer v. Angevine, 81 N. Y. 394; Curtiss v. Howell, 39 N. Y. 215; Cobb v. Hatfield, 46 N. Y. 533, and cases cited.

“A tort-feasor cannot make his own wrongful act the basis of an equity in his own favor.” Rowley v. Towsley, 53 Mich. 329, 19 N. W. 20.'

“The fact that the loss of one who seeks .to be protected by the application of the doctrine of subrogation arose from his own negligence will be fatal to his claims.” Sheldon, Subrogation, 2d ed. ¶ 43; Conner v. Welch, 51 Wis. 431, 8 N. W. 260; Rice v. Winters, 45 Neb. 517, 63 N. W. 830; German Bank v. United States, 148 U. S. 573, 37 L. ed. 564, 13 Sup. Ct. Rep. 702; United States Casualty Co. v. Bagley, 129 Mich. 70, 55 L.R.A. 616, 95 Am. St. Rep. 424, 87 N. W. 1044, and cases cited; Lewis v. Holdrege, 56 Neb. 379, 76 N. W. 890.

“A valid judgment for plaintiff finally negatives every defense that might and should have been raised against the action for the purpose of every subsequent suit between the parties and their privies in reference to the same matter.”

“The assignees of a contract are barred by the rule of res judicata.” Isensee v. Austin, 15 Wash. 352, 46 Pac. 394; Hansbrough v. Peck, 5 Wall. 497, 18 L. ed. 520, 524, and Rose’s Notes to same; Southern P. R. Co. v. Allen, 112 Cal. 455, 44 Pac. 796; Way v. Johnson, 5 S. D. 237, 58 N. W. 552.

“Where the original declaration fails to state a cause of action and by amendment a new cause of action is introduced after the time fixed by the Statute of Limitations for bringing suit has expired, a plea of the Statute of Limitations is good.” Lake Shore & M. S. R. Co. v. •Enright, 227 111. 403, 81 N. E. 374; Bahr v. National Safe Deposit Co. 234 111. 101, 84 N. E. 717; Walters v. Ottawa, 240 111. 259, 88 N. E. 651; Powers v. Badger Lumber Co. 75 Kan. 687, 90 Pac. 254.

After the statute has run, an amended complaint which for the first *406time states a cause of action cannot escape the bar of the statute by being filed as an amendment. Missouri, K. & T. R. Co. v. Bagley, 3 L.R.A.(N.S.) 259, and note, 65 Kan. 188, 69 Pac. 189; Clark v. Oregon Short Line. R. Co. 38 Mont. 177, 99 Pac. 298.

An amendment, though properly allowed, does not relate back to the date of bringing the suit for the purpose of determining questions of limitations. An amendment which introduces a cause of action barred is ineffectual to avoid the bar of the statute. Chicago, B. & Q. R. Co. v. Jones, 119 111. 361, 21 L.R.A. 111, 1 Inters. Com. Rep. 683, 11 Am. St. Rep. 278, 37 N. E. 217; Melvin v. Hegadom, 87 Neb. 398, 127 N. W. 139; Box v. Chicago', R. I. & P. R. Co. 107 Iowa, 660, 78 N. W. 691; Pratt v. Davis, 105 Mich. 199, 63 N. W. 506; Nugent v. Adsit, 93 Mich. 162, 53 N. W. 620; Wingert v. Carpenter, 101 Mich. 395, 59 N. W. 662; Flint *&*P. M. R. Co. v. Wayne Circuit Judge, 108 Mich. 80, 65 N. W. 583; Atchison, T. *&*S. F. R. Co. v. Sehroeder, 56 Kan. 731, 11 Pac. 1093; Shane v. Peoples, 25 N. D. 188, 111 N. W. 737.

In view of the law as laid down by our own supreme court, the plaintiff is now estopped to say that there was a failure of consideration, but on the other hand he himself has failed. Rev. Codes-1899, § 3932; Block v. Donovan, 13 N. D. 1, 99 N. W. 72; Comp. Laws 1913, § 6865; Civ. Code, § 3050; 3 Pom. Eq. Jur. 1260, and note; Merrill v. Merrill, 103 Cal. 287, 35 Pae. 768, 37 Pac. 392; Way v. Johnson, 5 S. D. 237, 58 N. W. 552.

“Rescission destroys the contract *ab initio*and leaves the parties in the same situation as if no contract had ever been made. Under these circumstances there can be no lien.” Davis v. William Rosenzweig Realty Operating Co. 20 L.R.A.(N.S.) 175, and note on p. 181, 192 N. T. 128, 127 Am. St. Rep. 890, 81 N. E. 913; Satterlee v. Cronkhite, 111 Mich. 631, 72 N. W. 616.

“Proceedings subsequent to the record are not before the court, and ' cannot be considered.” Edwards v. Eagles, 15 N. D. 150, 107 N. W. 13; Weicker v. Stavely, 11 N. D. 278, 103 N. W. 753; 2 Standard Ene. Proc. 218; Murry v. Burris, 6 Dak. 170, 12 N. W. 25; J. L. Gates Land Co. v. Olds, 112 Wis. 268, 87 N. W. 1088; O’Toole v. State, 105 Wis. 18,-80 N. W. 915; Finn v. Walsh, 19 N. D. 61, 121 N. W. 766; Berger v. Discher, 116 Wis. 170, 131 N. W. Ill; Stolt*407.man v. Lake, 124 Wis. 462, 102 N. W. 920; Miltimore v. Hoffman, 125 Wis. 558, 104 N. W. 841.

*George M.*Price, for respondent.

“Payments made by tbe defendant under his contract will stand as obligations against tbe plaintiff of tbe same character as when tbe contract was made.” Donovan v. Dickson, 28 N. D. 229, 148 N. W. 547.

M e claim in this case that payments made by appellant under tbe ■contract are obligations resting against tbe respondent. Comp. Laws 1913, subd. 2, §§ 5936, 7208; 6 Cyc. 306, 312, 313, 315; 18 Enc. PL & Pr. 772, 773, 858; 39 Cyc. 1345, 1355, 1377, 1378, 1380, 2028-2031; Warren v. Ward, 91 Minn. 254, 97 N. W. 886; Miller v. Shelbum, 15 N. D. 182, 107 N. W. 52; Eeiger v. Turley, 151 Iowa, 491, 131 N. W. 868; Lowry v. Eobinson, 3 Neb. (Hnof.) 145, 91 N. W. 174; Gillet v. Maynard, 5 Johns. 85, 4 Am. Dec. 329; Heilig v. Parlin, 134 Cal. 99, 66 Pac. 187; State v. Blize, 37 Or. 404, 61 Pae. 736.

Tbe rule at law that a party must lose all advantage gained by fraud, as well as tbe money which may have been paid out by him, does not apply in equity cases, where tbe party asking to set aside bis purchase has been benefited by a discharge of encumbrances and tbe payment of debts. White v. Trotter, 14 Smedes & M. 30, 53 Am. Dec. 112.

In such cases tbe vendee who has paid out money' and removed and paid encumbrances on tbe land has a lien upon tbe land for such amounts of money so paid. Griffith v. Depew, 3 A. K. Marsh. 177, 13 Am. Dec.- 142; 6 Cyc. 343, and cases cited; Joyce v. Dauntz, 55 Ohio St. 538, 45 N. E. 900; Stewart v. Stewart, 90 Wis. 516, 48 Am. St. Eep. 949, 63 N. W. 887; Johnson v. Tootle, 14 Utah, 482, 47 Pac. 1033; 37 Cyc. 378, 445; Comp. Laws 1913, § 6865.

Appellant in this case received tbe land with tbe benefit of tbe respondent’s payments, and be is in tbe same position as be would be if respondent bad paid tbe mortgage in full, instead of only in part. Code, § 7966.

“The rule that 'acquiescence in error takes away tbe right of objecting to it’ is applicable to error of procedure. One who consents to an irregular method of amending a pleading cannot thereafter urge tbe *408irregularity as error.” Pyke v. Jamestown, 15 N. D. 157, 107 N. W. 359.

“In considering the granting or refusing of amendments, the test is not whether the cause of action is changed in a technical sense, but whether the amendment should be allowed in furtherance of justice.”' Kerr v. Grand Forks, 15 N. D. 294, 107 N. W. 197.

The Statute of Limitations in such actions does not begin to run. until the date of the final entry of judgment in the former action. 25 Cyc. 1200; First Nat. Bank v. Avery Planter Co. 69 Neb. 329,, 111 Am. St. Rep. 541, 95 N. W. 622; Grant Twp. v. Reno Twp. 107 Mich. 409, 65 N. W. 377; Kennedy v. Stonehouse, 13 N. D. 232, 100-N. W. 259, 3 Ann. Cas. 217.

“A cause of action accrues when the person owning it first had legal right to sue upon it.” McPherson v. Swift, 22 S. D. 165, 133 Am. St.. Rep. 907, 116 N. W. 77; Elling v. Harrington, 17 Mont. 322, 42: Pac. 851; Lawrence v. Doolan, 68 Cal. 309, 5 Pac. 484, 9 Pac. 159.

One who believes he has title to lands, and under such belief and in good faith puts valuable and permanent improvements upon it, will be-protected to the extent of such improvements. Hunter v. Coe, 12 N. D. 505, 97 N. W. 872; Parker v. Vinson, 11 S. D. 381, 77 N. W. 1023; Meadows v. Osterkamp, 13 S. D. 571, 83 N. W. 625; Bright v. Boyd,. 1 Story, 478, Fed. Gas. No. 1,875; Luton v. Badham, 127 N. C. 96, 53 L.R.A. 338, 80 Am. St. Rep. 783, 37 S. E. 143; Herring v. Pollard, 4 Humph. 362,' 40 Am. Dec. 653; Jackson v. Loomis, 4 Cow. 168, 15 Am. Dec. 565; McKelway v. Armour, 10 N. J. Eq. 115, 64 Am. Dec. 446; Valle v. Fleming, 19 Mo. 454, 77 Am. Dec. 557; Scott v. Dunn,. 21 N. C. (1 Dev. & B. Eq.) 425, 30 Am. Dec. 181; Whitledge v. Wait, Sneed (Ky.) 335, 2 Am. Dec. 721; Dorer v. Hood, 113 Wis.. 607, 88 N. W. 1010; Zwietusch v. Watkins, 61 Wis. 615, 21 N. W. 823; 39 Cyc. 1400, 1401; Shuman v. Willetts, 19 Neb. 705, 28 N.. W. 3 01.

“One who pays to the owner any part of the price of real property¿inder an agreement for the sale thereof has a special lien upon the property, independent of possession, for such part of the amount paid as he may be entitled to recover back in case of the failure of consideration.” Comp. Laws 1913, § 6865.

“So, too, the vendee’s lien may attach where the contract has been *409mutually rescinded or rescinded by tbe vendor or by tbe purchaser under his right to do so.” 39 Cyc. 39, 2032, 2034, 2039.

The Statute of Limitations did not begin to run as to the right to sue for lien for payments, until final decision in the former case. First Nat. Bank v. Avery Planter Co. 69 Neb. 329, 111 Am. St. Bep. 541, 96 N. W. 622; Grant Twp. v. Beno Twp-. 107 Mich. 409, 65 N. W. 377; Kennedy v. Stonehouse, 13 N. L. 232,100 N. W. 259, 3 Ann. Cas. 217; McPherson v. Swift, 22 S. D. 165, 133 Am. St. Bep. 907, 116 N. W. 77; Elling v. Harrington, 17 Mont. 322, 42 Pac. 85; Lawrence v. Doolan, 68 Cal. 309, 9 Pac. 159, 5 Pac. 484.

A person cannot affirm a contract in part and disaffirm it in part; a person cannot rescind in part; he cannot take advantage of those parts of a judgment favorable to him and stand in court, within the rule of equity, and disaffirm those parts unfavorable. Beiger v. Turley, 151 Iowa, 491, 131 N. W. 866.

Grace, J.

Appeal from the district court of Cavalier county, Honorable Charles M. Cooley, judge of the first judicial district of North Dakota, acting by written request of Judge Kneeshaw, judge of the seventh judicial district.

The action is one to have certain mortgages, mechanics’ liens, and taxes which were at a prior time valid and subsisting liens against the southeast quarter of section 8, township 161, range 60, Cavalier county, North Dakota, and which were paid by the plaintiff in this action, declared and adjudged to be liens upon such premises; and the complaint in such action is really one to have such mortgages and liens which were paid by the plaintiff declared to be liens upon such premises,- and that the premises be sold for the satisfaction of all of such liens; and further that the value of the improvements made by the plaintiff upon the premises be adjudged a valid lien upon such premises, and the premises sold to satisfy the same in the same manner as a sale is made with reference to such mortgages and liens.

Dickson, one of the answering defendants, by way of defense, sets forth several defenses denying the good faith of the plaintiff in making any of the payments of the mortgages and liens which he did pay, and alleges that he purchased said land from Ezra Block, the original owner, in good faith for a full, adequate, and valuable consideration, *410and relying upon the judgment of the district court of Cavalier county and its affirmance by the supreme court of this state in an action wherein Ezra Block was plaintiff and E. I. Donovan defendant, in which action a certain warranty deed executed and delivered by Ezra Block, conveying to E. I. Donovan the premises in question, was by the order for judgment and judgment of such district court on the 24th day of May, 1902, canceled and set aside, and the plaintiff in that action, Ezra Block, declared to be entitled to the possession of said premises.

Eor a further defense the answering defendant pleads, sets forth, and relies upon the Statute of Limitations.

In addition to the foregoing defenses, a general denial is pleaded in such answer.

The facts in the case are substantially as follows: In February, 1901, Ezra Block was the owner of the land involved in this litigation. He, on the 19th day of February, 1901, by an oral agreement agreed to sell the land to Donovan. On the 19th day of February, 1901, the admissions in the pleadings and the testimony show that there were the following encumbrances against said land: A first mortgage to the Canadian & American Mortgage Company, $800; accrued interest thereon, $19.85. A mortgage to the Citizens Bank of Langdon for $220; accrued interest, $32.95. Mortgage to James McPhail, $164.35; accrued interest, $24.20. Mechanics’ lien in favor of Mahon & Kobinson; total principal and interest, $126.60. Mechanics’ lien in favor 'of Liebeler & Finerty; total principal and interest, $85. Taxes for 1900, $17.90, which were estimated at the time of making the deed at $25.25, making a total due upon the various liens and mortgages men•tioned on February 19, 1901, of $1,498.20.

Of these various amounts the admissions in the defendant’s answer or testimony show payment by Donovan of the following amounts:

> Citizen's Bank mortgage, paid by Donovan February 23, 1901 ........$252.95

> McPhail mortgage, paid by Donovan February 23, 1901 ................. 188.55

> Liebeler & Finerty lien, paid by Donovan October 5, 1901 ................ 85.00

> Mahon *&*Robinson lien, paid by Donovan February 28, 1902 ............. 126.60

> 1900 taxes, paid by Donovan February 20, 1902 ........................ 17.90

> 1901 taxes, paid by Donovan November 28, 1902 ........................ 28.75

> 1902 taxes, paid by Donovan December 1, 1903 .......................... 29.72

> Principal and interest on first mortgage, paid by Donovan October 30, 1901 264.00

> 1902 interest on first mortgage, paid by Donovan November 1, 1902 ...... 48.00

*411All of these amounts paid by Donovan were obligations against the land in question, which amounts were owing by Block, and which amounts were secured by mortgages upon the land or by mechanics’ liens, excepting the taxes, which were liens under the provisions of law relating thereto. The different mortgages and mechanics’ liens above referred to were to be paid by Donovan as part of the purchase price for the land which he bought from Block. The agreed purchase price of the same was $1,500.

In the original case which was' brought by Block as plaintiff against Donovan, this court said in that decision: “We do not understand that the decree goes further than to cancel the deed. As to other matters, it leaves both of them practically in the same positions they were in when the contract was made. The defendant owns the bank and MeBhail notes, which are amply secured on the land. We think this is a more equitable decree than would be one allowing him to now come in and specifically perform his contract.” [13 N. D. 8, 99 N. W. 12.]

The meaning of such language is that it was the intention of the court by such decree that Block should again have his land in the same condition it was at the time he deeded it to Donovan; that the warranty deed which he gave Donovan of such land was canceled; and that the intention of the decree in that case was to leave them both in the position they were at the time when the contract was made. This would give Block the land back subject to all the mortgages, liens, or encumbrances of whatever nature or kind which were against it at the time when he made the contract to sell such land to Donovan. This is more clearly shown by the further opinion of the court on rehearing, where this court said: “The payments made by defendant under the contract will stand as obligations against the plaintiff of the same character as when the contract was made.”

That clause means that if the defendant Donovan, under his contract or while the contract was in force, and by reason of the contract and the covenants in said contract, had paid any mortgage or mortgages, mechanics’ liens, interest, or taxes, notwithstanding such payments and notwithstanding the satisfaction of record of the instruments evidencing such indebtedness, 'where such instruments were of such nature that they could be satisfied of record, nevertheless all such payments so made by Donovan were by the terms of the decree in such action made *412obligations against the plaintiff, which he in equity was in duty bound to pay as a condition of his right to the rescission of the contract and the cancelation of the deed. The language of the decree, “they would remain as obligations against the plaintiff of the same character as when the contract was made,” when construed in the light of prior and pending litigations and the issues involved and the character of the relief demanded, means simply that for all the payments which Donovan had made of whatsoever nature, if they were made in pursuance of the covenants of his contract, he was entitled to be reimbursed for all such payments, and was entitled to a lien upon the land in question for all such payments until he had been reimbursed and paid for all the payments which he had made by way of paying mortgages, mechanics’ liens, taxes, or interest. This being true, Donovan had such rights of action to enforce such obligations as the nature of such obligations permitted. Thus, if the mortgages and mechanics’ liens by such decree of the court were to be and remain subsisting liens by way of mortgages and mechanics’ liens, Donovan would have the right to proceed and foreclose such mortgages and such mechanics’ liens, and to sell such land in such foreclosure proceeding for the purpose of reimbursing himself for such payments made, and realizing upon such mortgages and mechanics’ liens or other liens for which a decree for the sale of said land might be had. Donovan’s right to reimbursement for mortgages and liens which he paid under his contract has been recognized in three prior decisions of this court. First, in the case of Block v. Donovan, 13 N. D. 1, 99 N. W. 72, from which we have already quoted. In Donovan v. Block, 17 N. D. 408, 117 N. W. 527, this court said: “The conclusion we have arrived at in no way conflicts with what was said in Block v. Donovan of Donovan’s right to payment of the notes taken over by him while holding title to the land.” In Donovan v. Dickson, 28 N. D. 232, 148 N. W. 537, the court said: “As we view the facts, which, for the purpose of the demurrer, are deemed to be true, plaintiff [Donovan] is clearly entitled to the relief prayed for to the extent at least of the claims held by the various persons against Block, and which appellant [Donovan] either paid or purchased pursuant to his agreement with Block, with the purpose and intent of satisfying the same as a part consideration for the deed executed and delivered by Block to him. Whether appellant’s acts in tak*413ing up these claims constituted in law a payment or merely a purchase of assignments thereof is not very material, as we view it. To the extent of the moneys he thus distributed either as buyer or purchaser of these claims, they manifestly were disbursed because of the purchase of the land by the appellant from Block and with the ultimate intention of satisfying the same as to Block. They should therefore be treated in the nature of a payment *pro tanto*of the agreed consideration for the deed from Block to appellant. In so far as plaintiff’s right to recover any of these items is concerned, it is not material what the nature of the action brought by Block against Donovan was, whether to rescind an executed grant of the real property, or, as intimated by respondent, to declare a forfeiture of an executory contract. In either event, *appellant’s right to assert a claim against the land for reimbursement for such expenditures*was expressly recognized by this court in its decision of the case of Block v. Donovan, and his equitable rights were accordingly therein protected in the following language: ‘Payments by defendant under the contract would stand as obligations against the plaintiff of the same character as when the contract was made.’ ”

It seems, therefore, that it has been well settled by this court in such decisions that Donovan has a valid and legal right to reimburse himself out of the land for any and all payments which he made under the contract to take up mortgages or liens against such land. This being true, the plaintiff’s cause of action herein is a true and just one, and he should be allowed to recover for all the payments hereinbefore set forth which he made under such contract, unless, as the defendant claims, he is prevented from doing so by reason of the Statute of Limitations, which subject will be considered hereafter in this opinion.

In order to more clearly understand the matters under consideration in this case, it is necessary to examine with some degree of particularity the original action of Block v. Donovan, supra. That action was an action in equity brought by Block against Donovan for the purpose of rescission of the contract which he had made with Donovan to sell him the land in question, on the ground of no consideration, and for the purpose of canceling the deed which Block had delivered to Donovan in pursuance of such contract, being the land in question. This being the nature of the action which was maintained by Block against Donovan, it is necessary to determine at the outset what powers *414courts of equity may exercise in that class of actions for the purpose of determining whether or not the court had the power to make the decree which it did make, and declare “payments made by defendant under the contract would stand as obligations against the plaintiff of the same character as when the contract was made,” the meaning of which is that Donovan should have a lien upon the land for the payments which he had made, for the reason that the payments which he did make were payments of liens then against the land, such as mortgages and mechanics’ liens, and under the decree they were to stand as liens of the same character as when the contract was made.

Concerning the power of the court to grant such relief as was granted in the case of Block v. Donovan: The legislative branch of our state government has spoken in regard to some powers the court may exercise in adjudging the rescission of a contract. Section 7208 of the Compiled Laws of 1913 reads as follows: “Compensation May Be Required. —On adjudging the rescission of a contract, the court may require the party to whom such relief is granted to make any compensation to the other party which justice may require.” Section 3408 of the Civil Code of the state of California is exactly the same in its language as § 7208, Compiled Laws of 1913. Under this section the court has full power to .determine the amount which is owing or which must be paid by way of compensation from the party maintaining the action for a cancelation of the contract to the party against whom the action is brought. Goodrich v. Lathrop, 94 Cal. 56, 28 Am. St. Rep. 91, 29 Pac. 329. Section 5934, Compiled Laws of 1913, provides when rescission of a contract is permitted. Section 5936 prescribes the rules governing the rescission of contracts, subdivision 2 of which section is as follows: “He must restore to the other party everything of value which he has received from him under the contract; or must offer to restore the same upon condition that such party shall do likewise, unless the latter is unable or positively refuses to do so. Section 5933, Compiled Laws of 1913, provides that “a contract is extinguished by this rescission.” Rescission of contracts and cancelation of deeds are left to courts of equity. Thompson v. Hardy, 19 S. D. 91, 102 N. W. 299. Where a party brings an action to rescind a contract he must offer to restore everything of value received thereunder. Maddock v. Russell, 109 Cal. 417, 42 Pac. 139. Return of value received *415or offer to return the same is a condition precedent to the right to maintain the action for rescission of contract. Hammond v. Wallace, 85 Cal. 522, 20 Am. St. Rep. 239, 24 Pac. 837.

Where one brings an action for rescission and cancelation of contract for the nonpayment of the purchase money by a given date, he must return or offer to return money received on account of the contract. Wilson v. Sturgis, 71 Cal. 226, 16 Pac. 772.

It seems to be clear that where one brings an action to rescind a contract, and to procure a cancelation thereof or of some instrument connected therewith, a precedent condition to the right to maintain such action is that they restore all value received under such contract, and that the party against whom such action is brought must be placed in *status quo.*As to the necessity of restoring benefits received under a contract on rescission thereof, see Moline Plow Co. v. Bostwick, 15 N. D. 658, 109 N. W. 923; Sullivan v. Bromley, 26 S. D. 147, 128 N. W. 526; Sweeney v. United Underwriters’ Co. 25 S. D. 1, 124 N. W. 1107; Englebert v. Troxell, 40 Neb. 195, 26 L.R.A. 177, 42 Am. St. Rep. 665, 58 N. W. 852; Timmerman v. Stanley, 123 Ga. 850, 1 L.R.A.(N.S.) 379, 51 S. E. 760; Johnson v. Burnside, 3 S. D. 230, 52 N. W. 1057; Stackpole v. Dakota Loan *&*T. Co. 10 S. D. 389, 73 N. W. 258.

In the case of Block v. Donovan, the action was for a rescission of the contract and a cancelation of the deed. It was incumbent upon Block, therefore, to put Donovan in *status quo;*that is, to reimburse for any and all payments which he had made to take up any encumbrances which were against the land in question. It is a well-settled maxim of equity that he who seeks equity must do equity, and the decrees of the courts of equity are based largely upon this maxim. The court had this maxim in mind when by its decree it said that all payments made by Donovan would remain as obligations against the plaintiff of the same character as when the contract was made. That part of the decree of the court in such ease meant that Block would be required to do equity. Courts of equity refuse to recognize and protect equitable rights unless such rights are based on conscience and good faith. They are among the foundation stones upon which the temple of equity is built. ' So firmly established is the rule that conscience and good faith are the cardinal rules of equity," in fact the *416very foundation upon which equity rests, that even where a person in peaceable possession under claim of lawful title has in good faith paid assessments and made permanent improvements, the one seeking the aid of equity will be compelled to reimburse the occupant for his expenditures. Byers v. Fowler, 12 Ark. 218, 54 Am. Dec. 271; Galbraith v. Tracy, 153 Ill. 54, 28 L.R.A. 129, 46 Am. St. Rep. 867, 38 N. E. 937; Pratt v. Thornton, 28 Me. 355, 48 Am. Dec. 492; Bausman v. Kelley, 38 Minn. 197, 8 Am. St. Rep. 661, 36 N. W. 333.

It has been held that if a borrower of money on usurious interest seeks relief from such contract in a court of equity, the court will not interfere except on the terms that he pay the lender what is really and legally due him. Ziegler v. Scott, 10 Ga. 389, 54 Am. Dec. 395; American Freehold Land *&*Mortg. Co. v. Jefferson, 69 Miss. 770, 30 Am. St. Rep. 587, 12 So. 464; Morgan v. Schermerhorn, 1 Paige, 544, 10 Am. Dec. 449. The rule will be different if the lender comes into equity to assert and enforce his own claims under a usurious instrument.

There had been a dispute between Block and Donovan over a certain item of $97.25, which dispute ripened into the suit of Block v. Donovan. The court had permitted the cancelation of the deed which had been •delivered from Block to Donovan, but it also provided for the reimbursement of Donovan for all the payments which he had made, and provided that such payments should remain obligations of the same character as when the contract was made. The obligations which Donovan did pay were mortgage liens or mechanics’ liens, and the court by such decree intended that Donovan should be reimbursed out of the land itself for all the liens that existed against the land at the time of the contract which Donovan had paid. The case of Block v. Donovan, being purely a proceeding in equity brought for the rescission of a contract and the cancelation of a deed, must proceed through all its history and to its termination in accordance with the rules of •equity applicable thereto. In order, therefore, for the rescission of the contract and the cancelation of the deed to be effective, Donovan must be placed in *status quo*by the same action. All benefits, payments, or reduction of indebtedness of which Block got the benefit must have been restored, or an offer made to restore them to Donovan *417as a matter of equity, before Block would be in position to demand equitable relief. Block was bound to place Donovan in the same position he was in at the time of making such contract so far as payments made by Donovan were concerned. One cannot bring an action to rescind a contract unless he returns that which he has received under it, or the benefits which have accrued to him by reason of the contract. It is true the deed was canceled by the judgment of the court, but it is also true that all payments made by Donovan were to stand as obligations of the same character as when the contract was made, and they would stand as obligations of the same character by the decree of the court so far as it is possible for that to be effective. In the case of taxes paid, they could not again stand as taxes, but the amount thereof could stand as a lien in connection with the mortgages and mechanics’ liens by reason of the decree of the court of equity.

A court of equity has wide and extensive powers. If there were no provisions in the statutes speaking upon the powers of the court of equity, such court would nevertheless have, and does have, inherent power to grant such relief in cases in which the equitable power of the court is invoked, as to the court shall seem proper in order to do justice between the parties, and has the right under the exercise of its equitable powers of decreeing what shall be done to place the parties in *status quo*and do equity between them. The cardinal principle in an action for rescission and cancelation of a contract is a restoration to the party against whom the action is brought of everything of value received from him by reason of the contract asked to be rescinded. Johnson v. Burnside, 3 S. D. 230, 52 N. W. 1057; Stackpole v. Dakota Loan & T. Co. 10 S. D. 389, 73 N. W. 258; Lake Shore & M. S. R. Co. v. Richards, 30 L.R.A. 44, note. There must be mutuality of remedy to avail of equity jurisdiction. Winn v. Garland, 19 Ark. 23, 68 Am. Dec. 190; Jones v. Newhall, 115 Mass. 244, 15 Am. Rep. 97; Jones v. Williams, 139 Mo. 1, 37 L.R.A. 682, 61 Am. St. Rep. 436, 39 S. W. 486, 40 S. W. 353; Eckstein v. Downing, 64 N. H. 248, 10 Am. St. Rep. 404, 9 Atl. 626.

The next question for our consideration is the question of the Statute of Limitations. It seems that the judgment in the original ease of Block v. Donovan was entered about May 24, 1902. An appeal was taken from such judgment of the district court of Cavalier county to *418the supreme court of this state, but no supersedeas bond was filed in such appeal, so that the force and operation of such judgment was not suspended; but it did not become a final judgment until May 24, 1905. An execution might have been taken, but all such matters would have been subject to any modification which the supreme court of the state might make concerning such judgment or the rights of the parties to such action. The decision of the supreme court in such appeal did affect the rights of the parties, and it did in its opinion make'such a decision as resulted in the modification of the judgment, and which judgment when so modified became the final judgment in the case, and was of date April 11, 1905. The following words found in such opinion of the supreme court were in the concluding paragraph thereof in the case of Block v. Donovan: “The payments made by the defendant under the contract would stand as obligations against the plaintiff of the same character as when the contract was made,” and were incorporated into and became a part of the final judgment in the case as entered in the district court below. It would seem that this is the point of time when the judgment became final in that case.

Under § 1383, Compiled Laws of 1913, an action is commenced as to each defendant when the summons is served on him, or when the summons is delivered to the sheriff or other officer of the county in which the defendant resides with the intent that it shall be served. Where an attempt to serve the summons is made, but the same is not. served, the first publication of the summons must be made within sixty days after the attempt to serve the same. In the commencement of' this action Block was not made a party. It is very doubtful whether in this action he was ever a necessary party. He has no beneficial interest in the land in question. The debts which Donovan paid for him which were secured by liens against the land under the decree of the court still remain liens; that is, they remain obligations of the sanie character as when the contract was made. They were liens when the contract was made, with the exception of the táxes, and they are still liens by decree of the court. The payments made as interest were a part of the mortgage debts, and in a discussion of the interest they will be considered as part of the mortgage debts, upon which debts such interest accrued.

Upon a demurrer to the complaint in the action based upon a *419defect of parties, the court ordered that Block, who had not been made a party in the inception of the action, be made a party, and that the summons and complaint be amended to this effect. The summons and complaint were amended and constructive service thereof made upon Block. He made no appearance. The defendant Dickson appeared and answered in the case, and has taken part in all the proceedings of this litigation, and has made a general appearance in every respect thereto, and the court had full jurisdiction over both of such parties and the subject-matter of the action.

If the payments made by Donovan were to remain of the same character as when the contract was made, they will still remain liens by way of mortgage and mechanics’ liens, as all of such payments, with the exception of the taxes, were thus secured. Taking this view of the case, the statute would not run against the mortgage, if at all, until ten years from the time they became due. At the time the mechanics’ liens under consideration against the land in question were filed, there was no law limiting the time when an action might be commenced to foreclose a mechanics’ lien, unless perhaps the general law. The mechanics’ liens in question being filed, and being liens at the time when there was no time specially limited in which an action must be commenced to foreclose them, the law at that time is the law which governs. The present law limiting the time within which to commence the foreclosure of a mechanics’ lien was not passed until long after the filing of the liens in question, the present law being passed and became a law in the year 1903. It is thus clear that neither the mortgage liens nor mechanics’ liens were outlawed. Bights of action upon them had not been tolled by the Statute of Limitations. Whether the right of action accrued to Donovan to maintain actions to have such mortgages and mechanics’ liens declared liens in his favor, and foreclosed immediately after he had paid the same, or whether the right accrued to him at the termination of the litigation between Block and him, in either event it is plain that the Statute of Limitations had not commenced to run against such actions.

The defendant in this action at all times had full knowledge and notice of all the matters involved in the litigation herein. He was attorney for the plaintiff Block in the original action against Donovan. The entry of such judgment in the district court was appealed from, and *420did not become final until after the determination of tbe appeal to the supreme court therefrom, and any reliance placed by the defendant upon the judgment of the district court was with the knowledge and notice that such judgment might be changed and modified by the appeal therefrom and the determination of the supreme court thereon. The defendant is not in position to claim any benefits for the reason of being a good-faith purchaser; for it appears of record that he must have had full knowledge of all proceedings and therefore notice, and his purchase of the land was therefore subject to any rights which Donovan had therein or liens which Donovan had thereon.

Under § 6865, Compiled Laws of 1913, the plaintiff would have a right to recover in this action. Such section reads as follows: “One who pays to the owner any part of the price of real property, under an agreement for the sale thereof, has a special lien upon the property, independent of possession, for such part of the amount paid as he may be entitled to recover back in .case of a failure of consideration.” In the case at bar there was a sale of real estate under an agreement. Donovan was to pay the encumbrances. against the land in question to an amount equal to the purchase price of the land, which was $1,500. In pursuance and by virtue of such contract, the plaintiff did pay such encumbrances, and such encumbrances were part of the purchase price. The section just quoted gives him a special lien for any such payments. Again, applying the rules of equity, the plaintiff in the original action of Block v. Donovan having brought an action for a rescission and cancelation of the contract and deed, he was in duty bound to restore all the payments or benefits received under the contract, and the court of equity has full power to enter a decree declaring a lien upon such land for all of such payments, and to do full equity between the parties. If the purchaser is entitled to recover the purchase money paid under the contract, the purchaser is also entitled to a lien in those jurisdictions where a purchaser’s lien is recognized. 39 Cyc. 2039. As to the improvements made upon the land by Donovan, that is, the house, which he claims cost $800, we are of the opinion that that is balanced by Donovan receiving interest upon the payments which he made since the time he made them, and by rent or profits which he has received from the products of the land in question. We think all the equities between the plaintiff and defendant have been about as *421properly balanced by tbe judgment of tbe district court as is possible. We are of the opinion that the District Court analyzed thoroughly and fully all the equities between the plaintiff and defendant, and that its decree therein is an equitable and just decree, and that the same should be in all things affirmed, and the judgment of the District Court is affirmed, with costs.