
121 N.W.2d 628 (1963)
UNITED ACCOUNTS, INCORPORATED, a Corporation, Plaintiff and Appellant,
v.
Stanley F. LARSON, Arthur Bieber, Elsie Schweinforth, Goodman Farm Electric Company, a Corporation, The Dakota Oil Company, a Corporation, Reliable Inc. Plumbing and Heating Company, a Corporation, Defendants, and
Midwest Credit Company, a Corporation, Defendant and Respondent.
No. 8019.
Supreme Court of North Dakota.
February 9, 1963.
Rehearing Denied May 10, 1963.
*631 Rittgers & Granner, Jamestown, for appellant.
Hjellum, Weiss, Nerison & Ottmar, Jamestown, for respondent.
TEIGEN, Judge.
This is an equitable action to determine adverse claims. The plaintiff seeks to quiet title to a piece of land described in the complaint by metes and bounds, but which land was replatted during the course of the action. It is now described as Lot 5, Auditor's Plat #3 to the City of Jamestown, Stutsman County, North Dakota. It premises its claim to ownership on a sheriff's deed received in a mechanic's lien foreclosure. The plaintiff tenders to the defendant, Midwest Credit Company, the full balance of the unpaid purchase price of the land which defendant paid the vendor as the assignee of the contract-for-deed vendee. The defendant, Midwest Credit Company, in its counterclaim also seeks to quiet title to the land subject to the existing mechanic's lien which plaintiff claims was foreclosed, but which foreclosure defendant claims is void, and confesses judgment in the amount of the lien.
It is the contention of the plaintiff that in equity it is entitled to a conveyance of the full title of the land from the defendant and it is the contention of the defendant that plaintiff's pretended title is void on jurisdictional grounds.
Judgment was entered in favor of the defendant in the district court. The plaintiff has appealed and demands a trial de novo.
The facts necessary to an understanding of the questions presented are as follows: Elsie J. Whipkey was the owner of the land in question. On January 30, 1953, she entered into a contract for its sale to Stanley F. Larson, who went into possession. Larson engaged Paul R. Lewis, doing business as Lewis Construction Company, to improve the land by hauling dirt on to it to be used as fill. Lewis completed his work but was not paid for his labor. Lewis filed a mechanic's lien against Larson's equitable interest in the land in the amount of $766 on April 21, 1954.
Subsequently, Larson mortgaged the land to the defendant, Midwest Credit Company, in the amount of $202.50. The mortgage was filed for record on March 2, 1957. Larson failed to make the payments due under the contract to Whipkey and on April 5, 1957, Whipkey commenced an action to cancel the contract, naming and serving Larson as the only defendant.
Larson did not pay Lewis and on June 12, 1957, Lewis commenced an action to foreclose his mechanic's lien, also naming and serving Larson as the only defendant. In Whipkey's action to cancel the contract, an interlocutory judgment was entered against Larson on October 2, 1958. The interlocutory judgment decreed the instrument of sale between Whipkey and Larson a contract for deed. It defined its terms and provided for the payments to be made. In the event payments were not made in accordance with the judgment, it decreed that, upon proof thereof submitted to the court, final judgment of cancellation of the contract for deed would be entered providing a sixty-day redemption period. The contract for deed was assignable and Larson assigned the contract to the defendant, Midwest Credit Company, which assignment was filed for record on February 14, 1959. Judgment foreclosing the mechanic's lien in the Lewis v. Larson action was docketed on September 25, 1959. The land was sold by the sheriff at execution sale on December 28, 1959, and sheriff's certificate of sale was issued to the plaintiff, United Accounts, Incorporated, who was the successful bidder. On March 10, 1960, final judgment was entered in the action of Whipkey v. Larson cancelling the contract for deed and allowing the sixty-day redemption period.
The defendant, Midwest Credit Company, as assignee of Larson's contract for deed, redeemed within the sixty-day period by paying the amount required under the judgment cancelling the contract and received *632 from Whipkey a warranty deed. The amount paid to effect redemption was $1,471.13. The warranty deed from Whipkey to the defendant, Midwest Credit Company, was filed for record on March 6, 1960.
There was no redemption from the sheriff's certificate of sale in the Lewis v. Larson mechanic's lien foreclosure action. Sheriff's deed was issued to the plaintiff, United Accounts, Incorporated, which was filed for record April 29, 1961.
No appeal has been taken from the judgments in either of the two actions referred to above and they are final. This action was commenced on May 2, 1961.
It was stipulated and agreed at the trial of this action that the property now has a value of about $7,000. It was also stipulated that in the Lewis v. Larson action to foreclose the mechanic's lien, no notice of intention to enforce Lewis' mechanic's lien was served or otherwise given to Whipkey. The judgment roll in each of the prior actions was introduced in evidence by stipulation.
The district court found that the provisions of Section 35-12-21, N.D.C.C., which in part provides that before a mechanic's lienholder may enforce his lien he shall give written notice of his intention so to do "upon the record owner of the property affected", was not complied with because Whipkey was the record owner of the property and she had not been served. The court held that this was a jurisdictional requirement, that failure to serve Whipkey with notice of intention was fatal to the foreclosure action, that the judgment was void as to the defendant Midwest Credit Company and its predecessor in interest, Whipkey, and therefore the sheriff's deed to the plaintiff, United Accounts, is based on a void judgment and the sheriff's deed is also void. In other words, the lower court in effect held that Midwest Credit Company, as successor of Whipkey, was entitled to her defenses. The district court quieted title in the defendant subject to the mechanic's lien.
We cannot agree with the district court. The defendant, Midwest Credit Company, was not a successor of Whipkey, the contract vendor, but rather the successor of Larson, the contract vendee. Midwest Credit Company obtained the legal title from Whipkey by exercising its right as assignee of the contract vendee by taking advantage of the redemption privilege provided in the judgment cancelling the contract for deed. It was not a third person good faith purchaser for consideration from Whipkey. Midwest Credit Company, as the assignee of Larson, the contract vendee, exercised its rights under the contract and the provisions of the judgment cancelling the contract and redeemed. It was also a junior mortgagee. The mechanic's lien was intermediate and prior to Midwest Credit Company's mortgage. The action to foreclose the mechanic's lien was directed only at the contract vendee's equitable title to the land and the legal title holder had no interest in that action. Whipkey was not named or served as the defendant and no attempt was made to make her interests subject to the action. At the time the action to foreclose the mechanic's lien was commenced, Larson, contract vendee, was deemed the owner of the land within the meaning of the mechanic's lien law, Section 35-12-01, N.D.C.C. Salzer Lumber Company v. Claflin, 16 N.D. 601, 113 N.W. 1036. His contract for deed was on record and therefore he, Larson, was a "record owner of the property affected" described in Section 35-12-21, N.D.C.C. The property affected by the lien and its subsequent foreclosure was only Larson's equitable title and not Whipkey's legal title. Bovey-Shute & Jackson v. Odegaard, 53 N.D. 871, 208 N.W. 111. Whipkey was not a necessary party to the action. When Midwest Credit Company accepted the assignment of the contract for deed from Larson, it took Larson's equitable title subject to the mechanic's lien of record and the pending action to foreclose it. The action to foreclose continued against the original party but was enforceable against the original *633 party's assignee who was not made a party to the action. Rules 25(c) and 71, N.D.R. Civ.P.; United States v. Griffith Amusement Co., D.C., 94 F.Supp. 747, and Homestake Mining Co. v. Mid-Continent Exploration Co., 10 Cir., 282 F.2d 787.
Midwest Credit Company became the holder of the equitable title to the land by virtue of the assignment of the contract for deed to it from Larson. The equitable title was subject to the mechanic's lien and the pending action for its foreclosure. This equitable title so burdened was subsequently merged in the legal title through transfer from Whipkey. This transfer did not destroy the efficacy of the mechanic's lien. Hammond Lumber Co. v. Goldberg, 125 Cal.App. 120, 13 P.2d 814. Midwest Credit Company's equitable title, which was subject to the mechanic's lien and the action for its foreclosure, had now become perfected into a legal title. This did not operate to extinguish the lien nor did it operate to extinguish the action to foreclose the lien. The action to foreclose the mechanic's lien was commenced before the equitable interest was transferred by assignment to the defendant, Midwest Credit Company. Rule 25(c), N.D.R.Civ.P. provides that in case of any transfer of interest, the action may be continued by or against the original party, unless the court upon motion directs the person to whom the interest is transferred to be substituted in the action or joined with the original party. It appears that no motion for substitution or joinder was made. The action was continued against Larson, the original party, and under the circumstances this was proper. Liberty Broadcasting System v. Albertson, D.C., 15 F.R.D. 121. The judgment may be enforced against the assignee who was not a party to the action. Rule 71, N.D.R.Civ.P.; United States v. Griffith Amusement Co., supra, and Homestake Mining Co. v. Mid-Continent Exploration Co., supra.
Midwest Credit Company, having an interest in the land, had a right to redeem it from the lien at any time after the claim was due and before its right of redemption was foreclosed. Section 35-01-16, N.D.C.C. It failed to redeem and a sheriff's deed was issued to the plaintiff. The legality of the action by Lewis against Larson to foreclose the mechanic's lien is not attacked and is res adjudicata. The plaintiff, United Accounts, Incorporated, became the purchaser at the sheriff's sale and received sheriff's certificate of sale which ripened into a sheriff's deed. It is upon this title that the plaintiff relies. For the reasons stated herein, we find it is good as against the defendant, Midwest Credit Company.
This action is in equity. In the complaint, the plaintiff alleges it has tendered the defendant the full balance of the purchase price due under the contract, which was paid by the defendant to the seller. Plaintiff claims it is entitled to be subrogated to the rights of the defendant, Midwest Credit Company, acquired through the redemption.
The evidence discloses the defendant has also paid taxes and insurance premiums in the amount of $317.39. This sum plus the amount of $1,417.13 paid to redeem equals $1,734.52, an amount greater than the tender made before the commencement of this action. The plaintiff made tender and deposit, according to the evidence, in the amount of $1,550. It is probable defendant has paid additional taxes and insurance premiums during the pendency of this action.
The defendant, in its answer and counterclaim and in addition to its specific prayer for relief, prays for such other and further relief as the court may deem just. This is a proper pleading in an equity case.
We think the pleadings and the prayer are sufficiently broad to require the court, when the controversy was submitted to it, to take jurisdiction necessary to do complete justice between the parties. The court having acquired jurisdiction will retain it and do complete justice. Schmidt v. Johnstone, 31 N.D. 53, 153 N.W. 293; *634 Coykendall v. Kellogg, 50 N.D. 857, 198 N.W. 472, and Arhart v. Thompson, 75 N.D. 569, 31 N.W.2d 56.
The defendant has possession of the property.
The court finds that the most equitable adjustment of this matter is to allow the defendant the amount it paid to redeem, plus taxes and insurance premiums paid, and necessary repairs or other incidental expenses incurred in the preservation of the property. From such amount there shall be deducted rents collected or, if not rented, reasonable value for the use thereof during the period. The interest is to be computed on balances at the rate of 4% per annum.
Title to the land shall be quieted in the plaintiff subject to the above adjustments and the mortgage of the defendant filed on March 2, 1957, as it does not appear the court in the foreclosure of the mechanic's lien action had jurisdiction of the mortgagee. It was not served.
The judgment is reversed and the matter is remanded to the district court to take such additional evidence as is necessary to make a determination of the questions remaining and to order judgment according to this opinion and such additional evidence.
MORRIS, C. J., and BURKE and STRUTZ, JJ., concur.
ERICKSTAD, J., did not participate.

On Petition for Rehearing.
TEIGEN, Judge.
The respondent has petitioned for a rehearing in which he argues that the court overlooked the record and went outside of the theory and facts on which the case was tried, that the opinion does not support the determination that the contract vendee is the record owner contemplated within Section 35-12-21, N.D.C.C., that the court should have found that the respondent was a successor of Whipkey and that the court overlooked the equities.
We see no merits to the petitioner's arguments. It is true the parties to this action stipulated that Whipkey was the record owner of the property affected by the lien but such stipulation is a conclusion not borne out by the facts. It is true that Whipkey was the record owner of the legal title to the property but her legal title thereto was in no way affected by Lewis's mechanic's lien which was against the equitable interests only. There is no indication in the record that Whipkey in any way acquiesced in the improvements made by Lewis and there is no claim to that effect.
Our statute on mechanic's liens, Section 35-12-16, N.D.C.C., entitled "Land subject to lien" provides:
"The entire land upon which any building, structure, or other improvement is situated, or to improve which labor is done or work or materials furnished, including that portion of the land not covered thereby, shall be subject to all liens created under this chapter to the extent of all the right, title, and interest of the owner for whose immediate use or benefit the labor was done or materials furnished." (Emphasis supplied.)
The immediate use and benefit of the work performed by Lewis inured to Larson, the contract vendee, who was in possession of the land. Under such circumstances we have held the vendee is deemed the owner of the land within the meaning of this section. Salzer Lumber Co. v. Claflin, 16 N.D. 601, 113 N.W. 1036. In that case this court said on page 605 of the North Dakota Reports, 113 N.W. on page 1037:
"The materialman is simply subrogated to the interest that the vendee had in the contract, and no more. The vendor's rights are not at all to be affected."
We reaffirmed this rule in Johnson v. Soliday, 19 N.D. 463, 126 N.W. 99, and *635 again in North Dakota Lumber Co. v. Haney, 23 N.D. 504, 137 N.W. 411. See also Nearing v. Coop, 6 N.D. 345, 70 N.W. 1044; Wadge v. Kittleson, 12 N.D. 452, 97 N.W. 856; Woodward v. McCollum, 16 N.D. 42, 111 N.W. 623.
The owner of a mechanic's lien by the foreclosure thereof acquires only the interest of the owner of the land and the holder of a prior mortgage is not a necessary party. Bovey-Shute & Jackson v. Odegaard, 53 N.D. 871, 208 N.W. 111. This court has repeatedly held that a vendee is the equitable owner while the vendor holds the legal title as security for his claim. They are practically in the same position as a mortgagor and mortgagee. North Dakota Lumber Co. v. Haney, supra.
For these reasons Lewis's foreclosure of the mechanic's lien against Larson in no way could affect the title or ownership of Whipkey. When a contract vendee becomes liable upon a mechanic's lien against his equitable interest in the land, the interest of the contract vendor is not subject to the lien, unless it is shown he acquiesced in the purchase. North Dakota Lumber Co. v. Haney, supra.
There would be no purpose in serving Whipkey with the notice provided under Section 35-12-21, N.D.C.C., as Lewis's lien was effective only as against Larson's equitable interest in the land and in no way could affect Whipkey's interest where there is no showing that Whipkey acquiesced in the improvement. All that Lewis was entitled to in the lien foreclosure was to assert his claim against Larson's equitable interest in the land. Thus the "owner of the property affected" was Larson at the time of the mechanic's lien foreclosure and not Whipkey.
Statutes in pari materia should be construed together. Murray Bros. v. Buttles, 32 N.D. 565, 156 N.W. 207. Section 35-12-21, N.D.C.C., requiring service of the notice, is a part of the mechanic's lien law and a part of the same chapter as Section 35-12-16, N.D.C.C., which defines land subject to lien. The owner referred to in Section 35-12-21 is the same owner defined in Section 35-12-16, N.D.C.C.
The petitioner also claims that the respondent, Midwest, was the successor of Whipkey, the contract vendor. To so hold would permit a junior lienholder (Midwest held a mortgage on the land given by Larson which was an inferior lien to that of Lewis's mechanic's lien) to purchase the contract vendee's equitable title and, by paying the contract, to gain an interest superior to that of the mechanic's lien. There is no merit to the argument.
We believe the equities of the case are well settled in the opinion and will not be discussed further herein.
For the reasons stated, the petition for rehearing is denied.
MORRIS, C. J., and TEIGEN, STRUTZ and BURKE, JJ., concur.
ERICKSTAD, J., not having been a member of the Court when the case was submitted, did not participate.
