In 1916 the defendant purchased of the plaintiff certain real property situated in the city of Kenmare in this state, and received a contract for deed therefor. Under the laws then in force it was provided that in case default is made in the terms or conditions of a contract for the future conveyance of real estate, and the owner or vendor desires to cancel the same, “he shall, within a reasonable time after such default, cause a written notice to be served upon the vendee, purchaser, or his assigns, stating that such default occurred, and that said contract will be canceled or terminated, and shall recite *276in said notice the time when said cancelation or termination shall take effect, w'hich shall not be less than thirty days after the service of such notice.” Comp. Laws 1913, § 8120. And “such vendee,,or purchaser, or his assigns, shall have thirty (30) days after the service of such notice upon him, in which to perform the conditions or comply with the provisions upon which the default shall have occurred, and upon such performance and upon making such payments, together with the costs of service of such notice, such contract or other instrument shall be reinstated and shall remain in full force and effect the same as if no default had occurred therein. If, however, such vendee, or purchaser, or his assigns, shall not complete such performance or make such payment within the thirty (30) days herein provided, then and in that event the contract shall be terminated and shall not be reinstated by any subsequent offer of performance or tender of payment. No provision in any contract for the purchase of land or an interest in land shall bo construed to obviate the necessity of giving the aforesaid notice, and no contract shall terminate until such notice is given, any provision in such contract to the contrary notwithstanding.” Section 8122, Comp. Laws 1913, as amended by chapter 180, Laws 1915.
Under the terms of the contract in controversy the defendant agreed to pay to the plaintiff $18.27 on February 15, 1916, and $15 per month thereafter on the 15th day of each month, commencing on the 15th day of March, 1916, with interest at the rate of 8 per cent per annum from January 25, 1916. Defendant also agreed to pay all taxes levied upon the premises for the year 1915 and subsequent years. The defendant failed to make the payments due on August 15, 1916, and on the 15th day of each and every month thereafter. He also failed to pay any of the taxes assessed and levied against the premises. The plaintiff thereupon prepared a notice of cancelation as prescribed by the above-quoted statute, and caused the same to be served on defendant on November 28, 1917.' The notice stated the default which had occurred and the amount due upon the contract. It further stated that the plaintiff had elected to cancel and terminate the contract, and that such cancelation would take effect thirty days after the service of such notice upon the defendant. The defendant failed to make the payments, or in any manner cure the default existing in the terms of the contract, and on April 30, 1918, the plaintiff caused to bo served upon the defendant a notice *277to quit, in the form provided by § 9070, Comp. Laws 1913. Tbe defendant having failed to surrender tbe premises, tbe plaintiff on May 20, 1918, commenced an action of forcible detainer in justice’s court.
The plaintiff filed a written, verified complaint, wherein all tbe foregoing facts were fully averred. Tbe defendant, in bis answer, admitted tbe allegations of tbe complaint, but denied that tbe contract bad been canceled, and averred that be was tbe owner of tbe land. These allegations wore concededly based upon the contention that tbe notice of cancelation was insufficient for the reason that by virtue of chap. 151, Laws 1917, tbe time in which a purchaser or bis assigns must be afforded an opportunity to comply with tbe conditions of tbe contract and cure tbe default bad been extended to six months; and that inasmuch as tbe notice served in this case afforded only thirty days in which to cure tbe default it was of no effect. Tbe trial in tbe justice’s court resulted in a judgment in favor of tbe plaintiff. Tbe defendant thereupon appealed from, such judgment to tbe district court. In tbe notice of appeal it was specifically stated' that it was “tbe intention of tbe plaintiff to appeal, as aforesaid, on questions of both law and fact and from the whole of said judgment, and a new trial is demanded in said district court.” The trial in tbe district court resulted in findings and judgment in favor of tbe plaintiff, and tbe defendant has appealed from tbe judgment. No statement of case has been settled, and tbe case comes before this court upon tbe judgment roll proper. The trial court, in its findings, found all tbe facts heretofore stated.
Appellant contends:
(1). That tbe justice’s court was without jurisdiction to try tbe case, because tbe pleadings raised tbe issue of ownership of tbe premises.
(2). That inasmuch as tbe justice’s court bad no jurisdiction, the district court bad no jurisdiction, “because tbe pleadings on which tbe judgment was entered were tbe pleadings of tbe justice’s court.”
(3). That tbe mere service of the notice of cancelation did not cancel the contract, and that an action of forcible detainer does not lie until tbe contract is canceled.
(4). That in any event no sufficient notice of cancelation was served; i. e., that only thirty days’ notice was given; while tbe law required six months’ notice.
*278Tlie propositions will be considered in the order stated.
(1, 2) It is true a justice of tbe peace lias no jurisdiction to bear and determine a case wherein the boundaries of, or title to, real estate comes in question. Const. § 112. But the mere fact that such question is raised does not terminate the action or devest the justice of complete jurisdiction. Our statutes provide: “When such question arises upon a material issue joined ... or ... by controversy in the evidence as to a fact material to the determination of the issues in the action, the justice must discontinue the action and forthwith certify and transmit to the district court of his county all the pleadings and papers filed with him in such action. . . .” Comp. Laws 1913, § 9055. And “thereupon the district court shall have the same jurisdiction over such action as if it had been originally commenced therein. . '. .” Comp. Laws 1913, § 9056.
It is difficult to see wherein the answer presented any real issue as to title. It admitted all the facts which formed the basis of the action. The denial of title, and argument of ownership, were merely legal conclusions based upon the contention that the notice of cancelation was insufficient. But even though it be conceded that the answer presented an issue of title,—such as would have made it the duty of the justice to certify the case to the district court,—it would by no means follow that the district court was without jurisdiction to try and determine the issues presented by the pleadings. The action was brought into that court by a general appeal, wherein defendant demanded' a new trial of all questions of law and fact in the district court. The district court therefore became vested with the same jurisdiction over the action, and it became subject to trial therein in the same manner as though it had been originally commenced in that court. Comp. Laws 1913, § 9172. The appeal accomplished precisely the same purpose, so far as conferring jurisdiction upon the district court is concerned, that would have been accomplished in a proper case by certification by the justice. As was said by this court in Johnson v. Erickson, 14 N. D. 414, 105 N. W. 1104 (wherein it was held that the justice should have certified a case to the district -court) : “The same result has, however, been accomplished by the appeal, and the case has been transferred to the district court for trial. The district court would have acquired jurisdiction under a regular certificate by the filing of the papers, as *279required by Rev. Codes 1899, § 6670. All this has been done under the appeal. . . . The purpose of the amended statute was to prevent dismissals, and to furnish an easy method of transfer of jurisdiction to the district court. We are of the opinion that when a justice has, by disregarding the statute, made it necessary to appeal, the district court acquires jurisdiction, and that it is error for the district court to refuse to entertain the action and to dismiss the appeal.”
. (3) Section 8122, Comp. Laws 1913, as amended by chapter 180, Laws 1915, clearly contemplates that a contract for the future conveyance of real estate may be canceled and terminated by the method therein prescribed. Not only does that seem to be a reasonable inference from the portion of the statute heretofore quoted, but such intent is also clearly evidenced by the following provision: “In all cases of cancelation by notice of any such contract which has been recorded in the office of the register of deeds, a copy of the notice of cancelation served upon the vendee together with an affidavit of service and an affidavit of vendor or his assigns that the default of the vendee under the terms of the contract were not cured within thirty days from the date of service of such notice, shall be recorded in the office of the register of deeds.” Laws 1915, chap. 180.
Section 9069, Comp. Laws 1913, relating to actions of forcible detainer, provides that such action is maintainable, “when a party continues in possession . . . after the cancelation and termination of any contract for' deed, bond for deed or other instrument for the future conveyance of real estate or equity therein.” Comp. Laws 1913, § 9069, subd. 5.
Hence, we are of the opinion that an action of forcible detainer will lie where a contract for deed has been foreclosed in the manner provided by our statute. This view is in harmony with the opinions of other courts upon similar or kindred questions. See 39 Cyc. 1369; Monsen v. Stevens, 56 Ill. 335; Wilburn v. Haines, 53 Ill. 207; Jackson v. Warren, 32 Ill. 331; Leach v. Ritzke, 86 Ill. App. 483; Clark v. Bourgeois, 86 Miss. 1, 38 So. 187; Moak v. Bryant, 51 Miss. 560; McKissack v. Bullington, 37 Miss. 535; Kerns v. McKean, 65 Cal. 411, 4 Pac. 404; Gregg v. Von Phul, 1 Wall. 274, 17 L. ed. 536; Murphy v. McIntyre, 152 Mich. 591, 116 N. W. 197.
(4) It is conceded that plaintiff served a notice complying with the *280provisions of § 8122, Comp. Laws 1913, as amended by chapter 180, Laws 1917, but defendant contends that such notice was insufficient. He invokes chapter 151, Laws 1917, which reads: “Such vendee, or purchaser, or his assigns shall have six months after the service of such notice upon him in which to perform the conditions or comply with the provisions upon which the default shall have occurred and upon such performance and upon making such payments, together with the cost of service of such notice, such contract or other instrument shall be reinstated and shall remain in full force and effect the same as if no default had occurred therein.” In other words, defendant contends that he was entitled to six months in which to cure the default,, instead of thirty days as provided in the notice.
To this contention plaintiff makes answer:
(1) That chapter 151, Laws 1917, was intended to apply to future contracts only, and that it was not intended to apply to contracts formerly made; and,
(2) That if the statute was intended to apply to contracts made prior to the enactment thereof, it is unconstitutional on the ground that it impairs the obligations of contracts.
By both the Federal and state Constitutions the legislature is forbidden to pass any “law impairing the obligation of contracts.” U. S. Const. § 10, art. 1; N. D. Const. § 16. While it is true that, “in placing the obligation of contracts under the protection of the Constitution, its framers looked to the essentials of the contract more than to the forms and modes of proceeding by which it was to be carried into execution,” and “left to the states to prescribe and shape the remedy to enforce it” (McCracken v. Hayward, 2 How. 608, 612, 11 L. ed. 397, 399), it is equally true that the legislature may not, under the guise of a statute relating to the remedy, change the substantial rights of the parties (12 C. J. 1067, 1068; 15 Am. & Eng. Enc. Law, pp. 1055, 1056; Blakemore v. Cooper, 15 N. D. 5, 4 L.R.A.(N.S.) 1074, 125 Am. St. Rep. 574, 106 N. W. 566; Cleveland v. United States, 93 C. C. A. 274, 166 Fed. 677). Under the constitutional inhibition against legislation impairing the obligation of contracts, it is immaterial whether the obligation of a contract is impaired by acting on the remedy or directly upon the contract. Impairment in either case is prohibited.' 6 R. C. L. p. 356. And “it is a fundamental principle *281of constitutional law in reference to the obligation of contract, tbat tbe laws iu force at the time of making a contract, and tbe right to a remedy, enter into and form a part of it, as if they were expressly referred to or incorporated in its terms, and tbat they likewise constitute a part of its obligations.” 6 R. C. L. pp. 355, 356.
In bis work on tbe Constitution, Story said: “It is perfectly clear tbat any law, Avhich enlarges, abridges, or in any manner changes tbe intention of tbe parties, resulting from tbe stipulations in tbe contract, necessarily impairs it. Tbe manner or degree in Avhich this change is effected can in no respect influence tbe conclusions; for whether tbe law affect tbe validity, tbe construction, tbe duration, tbe discharge, or tbe evidence of tbe contract, it impairs its obligation, though it may not do so to tbe same extent in all tbe supposed cases. Any deviation from its terms by postponing or accelerating tbe period of performance which it prescribes, imposing conditions not expressed in tbe contract, or dispensing with tbe performance of those which are a part of tbe contract, however minute or apparently immaterial in their effect upon it, impairs its obligation.” Story, Const. 5th ed. § 1385.
Tbe Supreme Court of tbe United States has said:
“Tbe obligation of a contract includes everything within its obligatory scope. Among these elements nothing is more important than tbe means of enforcement. -This is tbe breath of its vital existence. . . . One of tbe tests tbat a contract has been impaired is tbat its value has by legislation been diminished. It is not by tbe Constitution to be impaired at all. - This is not a question of degree or manner or cause; but of encroaching in any respect on its obligation,—dispensing with any part of its force. Planters’ Bank v. Sharp, 6 How. 301, 12 L. ed. 447. Tbe remedy subsisting in a state when and Avhere a contract is made and is to be performed is a part of its obligation, and any subsequent law of tbe state which so effects that remedy as substantially to impair and lessen tbe value of tbe contract is forbidden by tbe Constitution, and is, therefore, void.” Edwards v. Kearzey, 96 U. S. 595, 24 L. ed. 793.
“It is also settled tbat the laAVS Avhich subsist at tbe time and place of tbe making of a contract ." . . . enter into and form a part of it, as if they were expressly referred to or incorporated in its terms. This, principle embraces alike those which affect its validity, construction, discharge, and enforcement. . . . It is competent for tbe *282states to change the form of remedy, or to modify it otherwise as they may see fit, provided no substantial right secured by the contract is thereby impaired. No attempt has been made to fix definitely the line between alterations of the remedy, which are to be deemed legitimate, and those which, under the form of modifying the remedy, impair substantial rights. Every case must be determined upon its own circumstances. Whenever the result last mentioned is produced, the act is within the prohibition of the Constitution, and to that extent void.” Von Hoffman v. Quincy, 4 Wall. 535, 18 L. ed. 403.
“The obligation of a contract, in the constitutional sense, is the means provided by law by which it can be enforced; by which the parties can be obliged to perform it. Whatever legislation lessens the efficacy of these means impairs the obligation. If it tends to postpone or retard the enforcement of the contract, the obligation of the latter is, to that extent, weakened. The Latin proverb, qui cito dat bis dad, he who gives quickly gives twice, has its counterpart in a maxim equally sound, qui serins solvit, minus solvit, he who pays too late pays less. Any authorization of the postponement of payment or of means' by which such postponement may be effected is in conflict with the Constitutional inhibition.” Louisiana v. New Orleans, 102 U. S. 205, 206, 207, 26 L. ed. 132, 133.
In applying these rules the Supreme Court of the United States has held that the law in force at the time a mortgage is executed, with all the conditions and limitations it imposes, is the law which determines the force and effect of a mortgage; and hence that changes in the laws imposing conditions and restrictions on a mortgagee in the enforcement of his right, and which affect its substance, are invalid as impairing the obligation, and cannot prevail. Von Hoffman v. Quincy, supra; Bronson v. Kinzie, 1 How. 311, 11 L. ed. 143; Brine v. Hartford F. Ins. Co. 96 U. S. 627, 24 L. ed. 858; Barnitz v. Beverly, 163 U. S. 118, 41 L. ed. 93, 16 Sup. Ct. Rep. 1042; Bradley v. Lightcap, 195 U. S. 1, 49 L. ed. 65, 24 Sup. Ct. Rep. 748. It has also held that a statute which extends the period of redemption, or gives a right of redemption, where no such right previously existed, impairs the obligation of mortgage contracts executed before its enactment. Barnitz v. Beverly, 163 U. S. 118, 41 L. ed. 93, 16 Sup. Ct. Rep. 1042; Howard v. Bugbee, 24 How. 461, 16 L. ed. 753; Gantly v. Ewing, 3 How. 707, 11 L. ed. 794; *283Bronson v. Kinzie, 1 How. 311, 11 L. ed. 143; Bradley v. Lightcap, supra. See also Hollister v. Donahue, 11 S. D. 497, 78 N. W. 959; Paris v. Nordburg, 6 Kan. App. 200, 51 Pac. 799; Muller v. McCain, 50 Okla. 710, 151 Pac. 621; Solis v. Williams, 205 Mass. 350, 91 N. E. 148. Other courts have held that a statute which alters the rights of the mortgagor and mortgagee as regards the rents and profits, or possession of the premises, during the period of redemption, cannot constitutionally be applied to foreclosures of mortgages executed before its enactment. Travellers Ins. Co. v. Brouse, 83 Ind. 62; Blackwood v. Van Vleet, 11 Mich. 252; Mundy v. Monroe, 1 Mich. 68; Canadian & A. Mortg. & T. Co. v. Blake, 24 Wash. 102, 85 Am. St. Rep. 946, 63 Pac. 1100.
In Bradley v. Lightcap, supra, the court said: “Confessedly subsequent laws, which in their operation amount to the denial of rights accruing by a prior contract, are obnoxious to constitutional objections.
In Bronson v. Kinzie, 1 How. 311, 11 L. ed. 143, the statute objected to gave the mortgagor twelve months to redeem after the sale, and Mr. Chief Justice Taney said: “It declares that, although the mortgaged premises should be sold under the decree of the court of chancery, yet that the equitable estate of the mortgagor shall not be extinguished, but shall continue for twelve months after the sale; and it moreover gives a new and like estate, which before had no existence, to the judgment •creditor, to continue for fifteen months. If such rights may be added to the original contract by subsequent legislation, it would be difficult to say at what point they must stop. . . . Any such modification of a contract by subsequent legislation, against the consent of one of the parties, unquestionably impairs its obligations; and is prohibited by the Constitution.”
In Barnitz v. Beverly, 163 U. S. 118, 41 L. ed. 93, 16 Sup. Ct. Rep. 1042, it was held that a state statute which authorized redemption of property sold in foreclosure of a mortgage where no such right previously existed, or extended the period of redemption beyond the time previously allowed, could not apply to a sale under a mortgage executed before its passage; and Mr. Justice Shiras, referring to Brine v. Hartford F. Ins. Co. 96 U. S. 627, 637, 24 L. ed. 858, 862, said:
“But this court held, through Mr. Justice Miller, that all the laws of & state existing at the time a mortgage or any other contract is made, *284which affect the rights of the parties to the contract, enter into and become a part of it, and are obligatory on all courts which assume to give a- remedy on such contracts, . . . that it is therefore said that these laws enter into and become a part of the contract,” and that “ ‘the remedy subsisting in a state when and where a contract is made and is to be performed is a part of its obligation.’ ”
Let us apply the foregoing principles to the facts in this case. The contract in this case expressly provided that “in case of the failure of the said party of the second Jpart (defendant) to make either of the payments or perform any of the agreements on his part hereby made and entered into, this contract shall at the option of the party of the first part (plaintiff) be forfeited and terminated. . . . And further it is mutually agreed by and between the parties aforesaid that time shall be the essence of this contract.” Under the laws in force at the time the contract was made, it could not be canceled except upon the service of a written notice reciting the default and affording the purchaser a thirty-day period in which to cure such default. Both the vendor and the vendee contracted with reference to such statute, and its provisions in effect entered into and became a part of the contract. The purchaser knew that even in case of default the contract could not be terminated and his rights forfeited summarily,—the vendor must either maintain an action or he must pursue the method provided by the statute. In either case it was the policy of the law to afford the vendee the time specified in the statute in which to cure his default. Raad v. Grant, 43 N. D. 546, 169 N. W. 588. The vendor, on the other hand, knew that in case of default on the part of the purchaser he might cancel the contract by service of notice as provided by the statute, and in such case the ptirchaser would be required to cure the default; i. e., redeem within tire .thirty-day period. Under the new law (Laws 1917, chap. 151) the vendor is required to give, and the purchaser is entitled to have, a six-month period in which to cure the default. There is no room for doubt as to what the legislature intended. It was clearly the intention to give the purchaser a right which he did not possess under the then existing law. That is, the legislature intended to give a defaulting purchaser six months, instead of thirty days, in which to cure his default. The result is that if the new law is applicable to contracts executed before its enactment it would have the *285effect of extending tlie purchaser’s right of redemption, and his right to remain in possession of the premises for a period of five months. In. fact the contract rights of the purchaser would be continued for five months after they would have ceased to exist under the provisions of the contract as made.
Did the legislature intend this provision of chap. 151, Laws 1917, to apply to contracts formerly executed? We think not. We believe that the legislature intended that this provision should apply only to, and in effect become a part of, contracts made after the law became effective. Chapter 151, Laws 1917, by its terms amends § 8122, Comp. Laws 1913, and repeals all acts and parts of acts in conflict therewith. Section 8122 is—and of course chapter 151, became—a part of the Code of Civil Procedure. By the express words of our statutes, no part of the Code of Civil Procedure “is retroactive unless expressly so declared.” Comp. Laws 1913, § 7320. The statute just quoted is merely a declaration of a well-recognized general rule of construction. Por it is well settled “that statutes will be construed to operate prospectively only, unless an intent to the contrary clearly appears. It is said ‘that a law will not be given a retrospective operation, unless that intention has been manifested by the most clear and unequivocal expression.’ And in another ease: ‘The rule is that statutes are prospective, and will not be construed to have retroactive operation unless the language employed in the enactment is so clear it will admit of no other construction.’ The rule is supported by numerous cases. The rule is especially applicable where the statute, if given a retrospective operation, would be invalid, as impairing the obligation of contracts or interfering with vested rights. The principle that all statutes are to be so construed, if possible, as to be valid, requires that a statute shall never be given a retrospective operation, when to do so would render it unconstitutional, and the words of the statute admit of any other construction. It is always presumed that statutes were intended to operate prospectively, and all doubts are resolved in favor of such a construction.” Lewis’s Sutherland, Stat. Constr. 2d ed. § 642. See also 6 R. C. L. p. 78.
The supreme court of Minnesota says: “It is a well-settled rule that laws are not to be construed retrospectively or to have a retrospective effect, unless it shall clearly appear that it was so intended by the *286enacting body, and unless such construction is absolutely necessary to give meaning to the language used.” Brown v. Hughes, 89 Minn. 150, 153, 94 N. W. 438. See also Adams & F. Co. v. Kenoyer, 17 N. D. 302, 308, 16 L.R.A.(N.S.) 681, 116 N. W. 98; Blakemore v. Cooper, 15 N. D. 5, 19, 4 L.R.A.(N.S.) 1074, 125 Am. St. Rep. 574, 106 N. W. 566; 8 Cyc. 731; 12 C. J. 721; 6 R. C. L. p. 78.
It follows from what has been said that the judgment appealed front must be affirmed. It is so ordered.
Birdzell, J., concurs.