This action was instituted to have the title to certain lands 'quieted in plaintiff and for a decree in ejectment •against defendant, and also to recover the sum of' $2,000 as rents and profits for the use of said land. The answer alleged that plaintiff, being the owner of the legal -title, entered into an agreement with -defendant whereby the defendant was to purchase a one-half interest in said land, and that at the time of -entering into -said agreement tlhe defendant paid to plaintiff $1,000 in cash, and executed a note for the sum of $3,850 payable to plaintiff, and- that the plaintiff then and there executed a deed to the defendant for an undivided one-half interest in said land, and which note and deed were then placed in escrow in the Meade County Bank of Sturgis; that defendant by the terms of said agreement was to have the management of said real estate-; and that the proceeds of -said property should be divided between the plaintiff and *21defendant. The defendant also interposed1 a counterclaim for certain moneys advanced, and1 for the value of onedialf of certain work and labor dene and performed by defendant in the improvement of said property. The plaintiff replied, setting up certain cither 'obligations claimed to be due him from, defendant.
It appears from the evidence that on the ist clay of April, 19to, the plaintiff was the owner in fee of the legal title of said lands, and on that date entered into- an agreement with defendant whereby he agreed to sell an undivided one-half interest therein to defendant for the sum of $4,850, and -that defendant then .and there paid $1,000 of said purchase price, and that a note for $3.850, according- to the terms thereof payable on or before two years from the said date with interest at the rate of 8 per cent, per annum, was then and there executed by defendant and placed in the custody of the Meade County Bank, tog-ether with a deed executed by the plaintiff to defendant as grantee of an undivided 'One-half interest in said land; and along with said deed and note was a written memorandum which, among other things, stated that said bank .should hold said deed and note, and that said bank should) deliver and turn over sail'd deed to the defendant upon his payment of said note, and which memorandum was executed and signed by plaintiff and said1 bank. It further appears from the evidence -that immediately upon the entering- into of said contract the defendant entered into the possession of said real estate, which consisted of about one section of farm- and pasture lands, and has ever since been in the use and occupation thereof; that no payments have ever been made by the defendant upon said note; that whatever -proceeds -have been derived from -said farm 'have been appropriated and kept by defendant; that said defendant m-acl-e -some improvements upon- said land; and that plaintiff from -time to time assisted in improving $aid lands.
The trial court made findings'substantially as follows: That •■on the ist -day of April, T910, at all times thereafter, and at -this time, the plaintiff is the owner of 'the legal title in fee of the whole of said -lands in question-; that -the clefen-ciaii-t has no right, title, car interest or lien or incumbrance upon said real ■property; that defendant is now in possession of said premises and has been in possession, thereof since April, 1910; that he entered into'possession -thereof by virtue of an option contract to purchase *22[he same, paying $1,000, the balance of $3,850, as evidenced by said note, to be paid in two years from the 1st day of April, 1910; that said note and a deed to defendant were placed in escrow, said -deed to be delivered’ to' defendant upon .the payment of said note; that defendant has failed and refused and still fail's and refuses. to¡ pay said note, being the balance of said purchase price, within the time provided' for by the terms of said note and agreement, or within a reasonable time thereafter, and that said defendant now wrongfully withholds the possession of said premises from plaintiff; that the plaintiff is entitled to the possession of said property and ’is also entitled to the sum of $2,100 for the use of said premises during the time defendant has been in possession thereof, and that plaintiff is entitled to recover from defendant $280 for the use of other lands; that defendant is entitled to the return of the $1,000 paid to plaintiff with interest thereon, the whole of which now amounts of $1,415, and that defendant is also entitled ¡to recover from .plaintiff $568.92 for improvements and work don© upon said, premises; that there is a balance due plaintiff from defendant in- 'the sum of $396.08. Upon said findings of fact judgment was rendered decreeing plaintiff to be the sole owner of the legal title in fee of the whole of said lands, and that he recover the immediate possession thereof from defendant, and that plaintiff also recover from defendant the sum of $396.08. From which judgment ¡the defendant appeals.
[1, 2,] From an inspection of the record it is evident that the issues were framed and the case tried with, but little regard for the rules of pleading or evidence. Some findings were made at variance with the theory of the pleadings; but it does appear that the trial court made findings in harmony with the issues as tried' out without objection by either party. We are of thi opinion that a trial court should make findings on the theory actually tried out by the parties, when so- tried1 out without objection from either side, and although the theory so- voluntarily tried out might vary from the theory as made by the1 pleadin-gs. This court cannot and should- not place itself in the attitude of doctoring up a case for either side a-nd then sending the same back for a new trial on some other and better theory on which it might have been tried in the first -instance. We can only deal with the case as it was actually tried out and’ as it appears from *23'the record before us. None of t'he attorneys who now appear in the case took part in the trial below. There is no question raised' in relation, to the pleadings or the issues tried out before •the trial court. There is no question raised' as to the correctness of the accounting between plaintiff and defendant as made by the findings of the trial count. The contention of ' tihle appellant is that the court erred in finding that the said contract for the purchase of one-half interest -in said real estate- entered into .between plaintiff and defendant was an option contract under which the interest in said land of defendant might be forfeited by reason of his failure to pay the balance of the purchase price according to- the -terms of said contract; but that the said transaction and agreement to. purchase said one-half interest iin said real estate and the payment of said $1,000 in cash, the making of said note and deed and the delivery thereof in escrow, and- the letting of defendant into the possession of said premises under said contract, constituted an equitable mortgage whereby the said land becaane security for the payment of said indebtedness, and which equitable mortgage, and the right of redemption therefrom on the paid of defendant could only 'be foreclosed as any other ordinary mortgage.
[3] AVe are of the opinion that the said transaction between appellant and respondent did! not result in creating an equitable mortgage; that the relation in -equity of mortgagor and mortgagee did not exist. There is nothing in the contract and'transaction in question that would constitute the s'am-e an equitable mortgage, or would indicate 'that the parties had any such object in contemplation.
[4-6] Under such .contracts lit is. only when the purchaser performs or tenders full anid complete performance of all the acts necessary to entitle him to a deed and conveyance of legal title that he becomes vested with an equitable title. Warvelle on Vendors, § 176; Chappell v. McKnight, 108 Ill. 570; National Ins. Co. v. Lumber Co., 217 Ill. 123, 75 N. E. 450, 108 Am. St. Rep. 239. It seems to be generally held that where, under such contracts, the vendee has performed in part and is let into possession, he acquired an equitable interest in the subject of sale which the courts will take into consideration and protect in cases involving such, interests, although the vendee has not acquired *24an equitable ’title. State Bank v. Bienfong, 133 Wis. 431, 113 N. W. 726. It also- seeing to be a rule of universal observance that ’the legal title of land draws to it the legal possession, and. that such rule is applicable to questions growing out of the relation of vendor and vendee. Section 885, Warvelle on Vendors. And .it also seems to be generally held that an- action to determine adverse claim or interests in real estate in the nature of ejectment, such as exists in this state, may be maintained by a vendor as an appropriate remedy in all cases where a vendee who has been let into possession under such a contract fails to •Comply with1 the terms of the same, as where there has been a default in the stipulated payments; that in such cases1 the vendee forfeits the benefit of the contract and cannot avail himself of it as a defense to such an action by his vendor, although the courts will take into consideration the equitable interest of such a vendee in possession who has made part performance. Section 886, Warvelle on Venders; Thorne v. Hammond, 46 Cal. 530; Hicks v. Lovell, 64 Cal. 20, 27 Pac. 942, 49 Am. Rep. 682; Dean v. Comstock, 32 Ill. 173; Williams v. Forbes, 47 Ill. 148; Wright v. Moore, 21 Wend, (N. Y.) 230.
[7, 9] The vendor in all such cases has an optional remedy either tc sue for specific performance, bring an action for recovery of the land, or, under the statute of this state, (chapter 138, Laws of 1913), foreclose the adverse rights of the vendee under such contracts. This last-mentioned statutory remedy is cumulative and’ declarator}'' of pre-existing remedies. Buckham v. Hoover, 18 S. D. 429, 101 N. W. 28. In whatever form the vendor may seek his remedy, where there has been a failure on the part of the vendee to comply with the terms of his contract, and where time is not of the essence of such contract or has been waived, it has been the usual rule of equity courts in terminating •the equitable interest of the vendee to fix by the terms of the decree some reasonable stated time, with notice, within which the vendee must comply with the terms of his contract, and, upon failure to so comply,' judgment will be entered against him, forever barring and foreclosing all his equities and rights under such contract. Keator v. Ferguson, 20 S. D. 473, 107, N. W. 678, 129 Am. St. Rep. 947; Speer v. Phillips, 24 S. D. 257, 123 N. W. 722; O’Connor v. Hughes, 35 Minn. 446, 29 N. W. 152; Far*25gusson v. Talcott, 7 N. D. 183, 73 N. W. 207; Boyum v. Johnson, 8 N. D. 306, 79 N. W. 149. Time does not appear to have been made of the essence of the contract in question. No reasonable time was fixed, and notice thereof given, within which the appellant might comply with the terms of said contract for the purpose of terminating his right and equities in said land. We are of the view -that this should have been done in order to fully terminate and bar appellant’s equities under this contract. Hence we are of the view that the judgment appealed from should be modified by tire fixing of some reasonable time not less than 60 days from service of notice thereof, within which appellant may have the privilege of fully complying with the terms of said con-, tract by paying to respondent or his attorneys for him all the principal and interest required to be paid by the terms thereof, and that written notice of such modification be given to- defendant or bis attorneys for him, and1 that in case of default in the making of -such payment final judgment be then entered, fully terminating and barring all of appellant’s rights, interest, and equities in and to said land under said contract, and awarding possession of said land' to respondent, all other portions of said judgment -to remain as they now are, and that appellant pay all the costs of this action, including costs of this appeal; -but in case appellant complies with the terms of said contract by making' full payment of all sums due and unpaid1 under the terms thereof, then a money judgment only shall be entered in favor of respondent for the amount found tq be due by the findings of the trial court for the value of the use of other lands of respondent not included within the terms of said contract. In case appellant complies with the terms of said contract, no costs- -shall be taxed by either party, including costs on appeal, and also- in case appellant complies with the terms -of said contract all the rights and equities in relation, to their joint interest and .accounting shall in- no manner ■be concluded by the judgment in this' action, but the same shall be left open for future adjustment between them-.
Costs -on this -appeal shall be -taxed by the clerk of this court in favor of respondent, 'but in case appellant complies -with and fully performs1 ail the 'conditions of said contract by -paving all principal and interest due -thereon, then- the costs taxed in this court shall be thereby vacated and extinguished, as well as all *26coste that may have been taxed in the lower court against appellant; but if appellant fails to comply with the terms of said contract within the time aforesaid, 'then the judgment appealed from is affirmed, with all costs in favor of respondent.
The order, denying a new trial is affirmed. The cause is remanded with directions to modify the judgment appealed from in such manner as is indicated by this opinion, and so modified: it is affirmed; that is, in case appellant makes default in complying with said contract then the judgment appealed from is affirmed in whole; but in case appellant complies with said contract then the judgment appealed from is vacated and set aside, excepting the money judgment .portion thereof for the value of the use of other lands not mentioned in said contract.