delivered the opinion of the court:
Respondent Donald Krug and petitioner Ruth Elizabeth Krug-Etheridge were divorced in 1972. A settlement agreement was incorporated in the decree. The agreement provided that it was “binding and conclusive” on the parties and that Donald would continue to provide medical and hospitalization insurance for Ruth. Ruth remarried, and Donald brought a petition for modification of his obligation to maintain Ruth’s insurance coverage pursuant to section 510(b) of the Illinois Marriage and Dissolution of Marriage Act (IMDMA) (Ill. Rev. Stat. 1979, ch. 40, par. 510). The trial court held that that statute, as recently amended, was unconstitutional as applied to Donald. Ruth appeals, contending that the trial court erred in its holding on the constitutionality of the statute, and that section 510(b), as amended, is the controlling law in this case.
On November 21, 1972, Ruth Krug-Etheridge obtained a decree of divorce from Donald Krug. The settlement agreement of the parties was incorporated into the decree, and the pertinent portions of that agreement provide that:
“1. *** this settlement agreement shall be binding and conclusive on the parties from the date of the entry of the decree of divorce and thereafter *** 13. *** Donald shall maintain coverage for Ruth on his medical and hospitalization insurance, or in the alternative will provide separate equivalent coverage for Ruth.”
Ruth Krug-Etheridge was remarried between the time of the divorce and the time that the petition which is the subject of this case was filed. Donald’s petition was based on the contention that Ruth’s remarriage terminated his obligation to continue payments of maintenance under section 510(b) of the IMDMA. A hearing was held on the petition on September 18, 1981. At the time of the hearing, section 510(b) provided that “[t]he obligation to pay future maintenance is terminated upon *** the remarriage of the party receiving maintenance ***.” That paragraph was amended by Public Act 82 — 194 to provide that “[ujnless otherwise agreed by the parties in a written separation agreement set forth in the judgment or otherwise approved by the court, the obligation to pay future maintenance is terminated upon *** the remarriage of the party receiving maintenance ***.” Public Act 82 — 194 was signed into law on August 14, 1981, and became effective on January 1,1982.
At the hearing on Donald’s petition, the trial judge stated that he regarded the payments for insurance coverage as maintenance, and that under the provisions of the amended section 510(b) he would have no choice but to order that the payments continue despite Ruth’s remarriage because he was “bound by the agreement.” He also commented that he felt it would be “appropriate to terminate the insurance coverage in view of her remarriage,” but that he would “have to rule in accordance with the statute that has just taken effect.” The judge then stated that “I agree with the outcome that justice and equity lies with the petitioner here [Donald], so I hold that to the extent that the law precludes us from what we should have done in justice and equity, I hold it in violation of the constitutionality of the petitioner. So I hold it unconstitutional to that extent.”
The court then entered an order which terminated Donald’s obligation to pay for Ruth’s insurance. The order stated that “the recent amendment to Ill. Rev. Stat. ch. 40, sec. 510(b), providing for the continuation of maintenance after the remarriage of the recipient, where the original decree provided for medical and hospitalization insurance without termination and where the terms of the decree were ‘binding and conclusive upon the parties from the date of the entry of said decree for divorce and thereafter,’ is unconstitutional.” Ruth appeals from that order.
Ruth’s first contention on appeal is that the trial court erred in holding that Public Act 82 — 194 is unconstitutional “to the extent that the law precludes us from doing what we should have done in justice and equity.” We agree.
In First Federal Savings & Loan Association v. Walker (1982),
“We do not know of any power existing in a court of equity to dispense with the plain requirements of a statute; it has been always disclaimed, and the real or supposed hardship of no case can justify a court in so doing. When a statute has prescribed a plain rule, free from doubt and ambiguity, it is as well usurpation in a court of equity as in a court of law, to adjudge against it; and for a court of equity to relieve against its provisions, is the same as to repeal it.”91 Ill. 2d 218 , 227.
In the instant case, the trial court gave no reason for its ruling on the constitutionality of Public Act 82 — 194 other than its expressed belief that the operation of that statute would prevent it from ruling in accordance with the equities of the case. We hold that the trial court erred in declaring that Public Act 82 — 194 is unconstitutional as applied to Donald.
Ruth next contends that section 510(b) as amended by Public Act 82 — 194 is the law which properly governs this case. The trial court concluded that the amendment to section 510(b) was applicable to Donald’s petition although the hearing on the petition was held on September 18, 1981, and the effective date of the amendment was January 1, 1982. In In re Marriage of Mass (1981),
Additionally, the amended section 510(b) is the applicable law on the appeal of this case because of the general rule that when the legislature changes the law while an appeal is pending, the reviewing court will apply the law as it exists at the time of its decision, rather than the law as it was at the time of the trial court’s judgment. (See Rios v. Jones (1976),
The only other question involved in this appeal is whether the recitation in the settlement agreement that the agreement is “binding and conclusive” on the parties obligates Donald, through the operation of section 510(b), to continue to maintain medical and hospitalization insurance for Ruth despite her remarriage. The trial court expressly found that the agreement imposed such an obligation, and Ruth’s brief in this appeal assumes that this obligation exists, while Donald contends that the pertinent language is mere “boilerplate” and that the agreement may be modified to terminate his obligation to maintain the coverage.
In Mass, as in the instant case, the court was faced with the question of whether a settlement agreement which was entered into prior to the enactment of the IMDMA created an obligation for the continued payment of maintenance after the remarriage of the recipient under section 510(b). In Mass, the agreement provided for periodic payments in fixed amounts to extend for a period of over 20 years. The court noted that although the agreement did not expressly preclude modification of the agreement after the remarriage of the recipient, section 502(f) of the IMDMA requires that an agreement to continue payments of maintenance after the remarriage of the recipient be clearly expressed in the agreement. The court held that because the agreement was entered into prior to the effective date of the IM-DMA, the parties were not required to draft the agreement in accordance with the IMDMA’s strict requirements. (
In the instant case, as in Mass, section 502(f)’s requirement that any agreement that would preclude modification of maintenance payments be expressed in the settlement agreement should be relaxed because the agreement was entered into prior to the effective date of the IMDMA. Therefore an inquiry into the intent of the parties when the agreement was entered into is necessary to determine whether such an agreement may be implied. The reviewing court in Mass was presented with the record of a full evidentiary hearing to aid it in deciding whether there was an implied agreement to continue the payments.
In the instant case, the trial court held a brief hearing and made an abrupt sua sponte determination that Public Act 82 — 194 was unconstitutional. The parties were precluded by that ruling from offering any evidence or making any argument going to the intent of the parties and the meaning that they accorded the language that stated that the agreement was “binding and conclusive.” In cases where the trial court on its own motion formulates a theory of the case that becomes the basis for its judgment, the parties must be given the opportunity to present evidence going to that theory. (See Trzebiatowski v. Jerome (1960),
Donald asserts that the language of the agreement itself precludes a finding that there was ever an agreement to continue the insurance payments beyond the time that Ruth remarried. He relies on In re Marriage of Pearson (1981),
For the reasons expressed herein, the judgment of the circuit court of Cook County is reversed and this cause remanded with directions to proceed in conformity with the views expressed herein.
Reversed and remanded with directions.
DOWNING and PERLIN, JJ., concur.
