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 o'f 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 Pac. (2d) 940].) 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 oil 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 *129given 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 Sup. 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. 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 Sup. Ct. 384, 46 L. Ed. 612] ; New Orleans C. & L. Ry. Co. v. Louisiana, 157 U. S. 219, 224 [15 Sup. Ct. 581, 39 L. Ed. 679]; Aikens v. Kingsbury, 170 Cal. 674, 678-681 [151 Pac. 145]; Colma Veg. Assn. v. Bonetti, 91 Cal. App. 103, 112 [267 Pac. 172] ; Maguire v. Cunningham, 64 Cal. App. 536, 551-553 [222 Pac. 838].)
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 *130reconveyed to Mm. 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 Pac. 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. ’ ’
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.) 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 Ms 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 *131he 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.