
2 Cal.2d 127 (1934)
E. J. LINCOLN, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY et al., Respondents.
L. A. No. 14787. 
Supreme Court of California. In Bank.  
December 26, 1934.
 W. C. Shelton and George W. Burch, Jr., for Petitioner.
 Everett W. Mattoon, County Counsel, and S. V. O. Prichard, Deputy County Counsel, for Respondents.
 WASTE, C.J.
 This is an original proceeding in mandate to compel the respondent Superior Court to entertain and determine an action commenced therein to foreclose a deed of trust. A general demurrer to the petition has been filed.
 Petitioner, as beneficiary under a trust deed, instituted an action in the respondent court on May 7, 1934, to foreclose the same. At the time the trust deed was executed, on February 24, 1933, no right of foreclosure existed in the absence of unusual and peculiar circumstances not here present. (Bank of Italy Nat. Trust & Sav. Assn. v. Bentley, 217 Cal. 644 [20 PaCal.2d 940].) [1] However, on August 21, 1933, prior to the commencement of this suit, section 725a was added to the Code of Civil Procedure. This new section gives to the beneficiary or trustee of a trust deed the right to maintain an action for its foreclosure in the manner and subject to the provisions, rights and remedies relating to the foreclosure of a mortgage. The respondent court refused to grant petitioner the relief sought even though the defendant trustors had permitted their defaults to be entered in the action. Its refusal to act was based on the conclusion that it was without jurisdiction because of the asserted unconstitutionality of section 725a as applied to trust deeds executed prior to its enactment. To test the propriety of the court's ruling in this particular the present proceeding was instituted.
 We cannot agree with the respondent court in its conclusion that section 725a, supra, is unconstitutional in so far as it purports to apply to trust deeds antedating its adoption. The right of foreclosure therein provided for is *129 given as an alternative to the exercise of the power of sale under a trust deed. The section is a remedial statute which merely affords a new and additional means of enforcing a right. The cases distinguish between laws which impair the obligation of contracts and those which simply undertake to give a more efficient remedy to enforce a contract already made. (Bernheimer v. Converse, 206 U.S. 516, 530 [27 S.Ct. 755, 51 L.Ed. 1163].) The obligation of a contract has reference alone to the rights of the parties arising thereunder and not to any remedy for their enforcement. A remedy afforded by a statute passed subsequent to the execution date of a contract may be invoked by a party to the contract who has been wronged by its nonperformance. [2] In other words, one who engages by contract to do a certain thing cannot claim that the obligation he has assumed is impaired by legislation that is designed only to enforce performance of his obligation. Such legislation does not impair the obligation of the contract and is constitutional. (Bernheimer v. Converse, supra; Wilson v. Standefer, 184 U.S. 399, 410 [22 S.Ct. 384, 46 L.Ed. 612]; New Orleans C. & L. Ry. Co. v. Louisiana, 157 U.S. 219, 224 [15 S.Ct. 581, 39 L.Ed. 679]; Aikens v. Kingsbury, 170 Cal. 674, 678-681 [151 P. 145]; Colma Veg. Assn. v. Bonetti, 91 Cal.App. 103, 112 [267 P. 172]; Maguire v. Cunningham, 64 Cal.App. 536, 551-553 [222 P. 838].)
 [3] That section 725a, supra, is purely remedial does not admit of doubt, as it affords, as stated above, merely a new and additional means of enforcing an existing right. The respective rights of the trustor and beneficiary are neither increased nor diminished by the section. It does not enlarge the obligation assumed by the trustor but only enables the trustee or beneficiary to compel the performance of that obligation. In other words, the right of the beneficiary to have the property sold in the event of default remains as at the time the contract was executed, while the right of the trustor to have the property reconveyed to him upon satisfying the debt obligation, to secure which the property was conveyed to the trustee, is in no way affected by the section. Without any further condition than that specified in the trust deed, viz., satisfaction of the debt obligation, the trustor has the right to have the property *130 reconveyed to him. In addition, in the event of foreclosure he acquires an equity of redemption not otherwise available to him.
 The case of Schwertner v. Provident M. Building-Loan Assn., 17 Ariz. 93 [148 P. 910], presented a situation wherein at the time of the execution of the trust deed therein involved the law provided, in event of default, for an advertised sale of the property but, at the time of breach had been amended to provide for judicial foreclosure. Referring to the change in the law the court declared: "This is a remedial statute, and it is well settled that laws changing the remedy or substituting another or different remedy are valid, so long as they do not impair the obligation of contracts."
 [4] Of course, the existing remedy cannot be so altered as to take away or impair any of the rights given by the contract nor can a specific and exclusive remedy, provided by the contract itself, be changed by legislation, because it constitutes a part of the contract. (Wilson v. Standefer, supra, 410; Aikens v. Kingsbury, supra, 680.) [5] The deed of trust here involved, as is customary, provides for an advertised sale by the trustee in the event of default. This remedy is not expressly declared to be the exclusive remedy available to the beneficiary to protect his rights under the instrument. On the contrary, the instrument contains a provision authorizing the trustee or beneficiary, in the event the trustors "fail or refuse to make any payment or do any act", which they are obligated to make or do, "to commence ... any action or proceeding affecting or purporting to affect the security of this Deed of Trust, the interests of Beneficiary or the rights, powers and duties of Trustee hereunder, whether brought by or against Trustor, Trustee or Beneficiary". This provision is sufficiently comprehensive to include any remedies subsequently authorized by the legislature for the protection of the beneficiary's rights or enforcement of the trustors' obligations under the instrument. Likewise, this provision, impliedly at least, would seem to authorize the imposition on trustors of any costs or expenses incidental to a foreclosure and of which complaint is here made.
 In conclusion, we reiterate that because the beneficiary elects to accept all the incidents of judicial foreclosure when *131 he pursues the alternate remedy provided by section 725a, supra, and because the trustor loses no substantive right, but, in fact, gains a statutory right of redemption, by the beneficiary's election, the section is not unconstitutional as applied to trust deeds executed prior to its enactment. The demurrer is overruled.
 Let a peremptory writ of mandate issue as prayed.
 Thompson, J., Curtis, J., Preston, J., and Langdon, J., concurred.
 SHENK, J.,
 Concurring.
 I concur in the result on the second ground stated in the main opinion, viz., that the trust deed involved contains a provision authorizing the trustee or beneficiary, in case of default, "to commence any action or proceeding" affecting the security of the deed of trust or the interests of the beneficiary, and that under this authority the beneficiary could commence an action in foreclosure as provided in section 725a, pursuant to the contract. In my opinion the question of an impairment of the contract is therefore not properly in the case.
 Furthermore, I am not persuaded that section 725a does not generally impose such additional burdens on the trustor as to render the section objectionable as against outstanding deeds of trust which do not contain the authorization to foreclose. The following are a few of them:
 1. He is subjected to the expense of the foreclosure suit against which he has in effect contracted.
 2. Under his contract he has the undisputed right of possession for three months (sec. 2924, Civ. Code), plus twenty days (sec. 692, Code Civ. Proc.), not only after default but after the notice of default has been recorded. Under section 725a the trustor may be subjected to foreclosure and sale within a few weeks.
 3. Under his contract a deficiency judgment may be recovered against him only in an independent action.
 4. He is subjected to costs of suit not recoverable under his contract.
 The option of the beneficiary or trustee to foreclose instead of to sell as provided by the contract can hardly be said to be for the benefit of the owner of the land, and I cannot ascribe to the creditor the beneficent motive to pursue *132 a course less advantageous to himself. If the intention be to benefit the debtor, the law should provide that at his option, also, a foreclosure should be had. But no one would contend that the debtor could compel the creditor to pursue the course of court foreclosure unless the contract so provided.
