Respondent Mary Diane Marshall (Diane) filed a petition to modify the alimony provision of a dissolution decree to require petitioner John R. Marshall to continue alimony payments beyond the date set by the decree. Diane’s petition was dismissed, and the court held that she was not entitled to reinstatement of alimony payments which, by the terms of the dissolution decree and stipulation, ceased to be payable prior to the date of her petition to modify. We reverse and remand.
On July 15, 1982, a decree of dissolution was entered terminating the five-year marriage of Diane and John Marshall. Iowa Code section 598.21(3) (1981) states the court may grant an order requiring support payments to either party for a limited or indefinite length of time after considering several enumerated factors.
The decree of dissolution approved, and incorporated by reference in the decree, the following provision of the stipulation of settlement by the parties:
Alimony: The Petitioner [John] shall pay to the Respondent [Diane] as alimony the sum of $700.00 per month, beginning the first day of the month following the entry of the Decree of Dissolution in the above captioned matter and $700.00 payable on the first of each and every month thereafter for a period of two years or until such time as the Respondent shall either die, remarry, or shall cohabitate with another man without the benefit of marriage, whichever event shall occur first. This agreement with regard to alimony has been made pursuant to § 598.21(3), Code of Iowa (1981).
John made all of the alimony payments required under the terms of the dissolution decree and stipulation.
No petition for modification or review of the alimony provision was filed by either party in the two years, ending July 1,1984, during which alimony was payable. Diane filed a petition in the district court on November 19, 1984, seeking modification of the alimony provision. The petition sought reinstatement of the alimony payments due to thé occurrence of a circumstance not contemplated by the court in its original decree of dissolution; specifically, Diane was diagnosed as having breast cancer, had a double < mastectomy, and had been unable to locate employment compatible with her medical condition, treatment and continued poor health.
John filed a special appearance, Iowa Rule of Civil Procedure 66, challenging the district court’s jurisdiction to modify the dissolution decree after the alimony had expired under the terms of the decree. The district court decided that it retained subject matter jurisdiction to modify alimo*394ny awards and overruled the special appearance.
In his resistance to the petition to modify, John again alleged the court was without subject matter jurisdiction or power to modify the dissolution decree under the circumstances in this case.
After a trial on the merits, the district court dismissed Diane’s petition to modify, ruling that alimony cannot be reinstated in the absence of an express reservation by the court of the power to do so. It is from this ruling that Diane appeals. Thus, the court did not reach the merits of Diane’s petition and did not rule on her application for trial court attorney fees.
The ultimate issue we address is whether the court has the power to modify a decree of dissolution to reinstate alimony payments which have terminated by the terms of the original decree. Our review in this equity matter is de novo. Iowa R.App.P. 4.
I. Jurisdiction. John by his special appearance and again on appeal challenges the court’s subject matter jurisdiction over Diane’s petition seeking the reinstatement of alimony. For subject matter jurisdiction to exist, a court must have “the power to hear cases of the general class to which the proceedings in question belong.” Rerat Law Firm v. Iowa District Court, 375 N.W.2d 226, 230 (Iowa 1985).
Iowa Code section 598.21(8) (1983) vests authority in the court to “subsequently modify orders [for disposition and support] made under this section when there is a substantial change in circumstances.” We have ruled that the district court has authority to “hear and determine cases involving alimony and modification of alimony awards.” In re Marriage of Carlson, 338 N.W.2d 136, 140 (Iowa 1983).
Thus, we find John’s challenge to the court’s subject matter jurisdiction without merit. The court properly exercised its jurisdiction in entertaining Diane’s petition to modify.
II. Power to modify. We next consider whether the district court has the power and authority to modify a decree of dissolution to reinstate alimony payments when the payor spouse has met his obligation under the initial decree and the time for alimony payments has expired.
The parties acknowledge two key principles of Iowa dissolution law. First, where there is no initial award of alimony, a decree of dissolution cannot be modified to include alimony. E.g., Carlson, 338 N.W.2d at 139. Additionally, where the duration of alimony payments is indefinite, the dissolution decree may be modified on a showing of substantial change in circumstances, not contemplated by the court at the time of its initial decree. In re Marriage of Full, 255 N.W.2d 153, 159 (Iowa 1977); Thayer v. Thayer, 286 N.W.2d 222, 223 (Iowa Ct.App.1979).
What then is the power of the court to modify when the award of alimony in the initial decree is for a finite period? In this case, Diane was awarded twenty-four months of alimony, with payments to terminate on July 1, 1984. Four months after that date she sought reinstatement of the alimony obligation based on a substantial change in circumstances.
John contends that at the termination of a finite award of alimony payments the payor spouse is freed of any further alimony obligation to the payee. See Eckert v. Eckert, 299 Minn. 120, 122-23, 216 N.W.2d 837, 838-39 (1974). John argues that as of his last alimony payment the decree becomes final and his obligations thereunder fixed, finite and forever terminated. Cf. Eckert, 299 Minn. at 126, 216 N.W.2d at 840-41 (decree permanent on final payment to achieve finality); Doerflinger v. Doerflinger, 646 S.W.2d 798, 800-01 (Mo.1983) (Unless the award of limited payments of alimony is appealed, it becomes a final adjudication of dependency and is not subject to modification.). Thus, he argues the court should not have the power to modify an award of a specific number of alimony payments after the final payment under that award is paid. He further equates the time after the termination of alimony with the initial refusal of alimony in the decree.
*395This court in Carlson, however, stated that an award of alimony which has been terminated by a condition subsequent, such as remarriage, is not the equivalent of no initial award. 338 N.W.2d at 139. Thus, an award which was terminated by operation of the decree should be treated differently from a situation in which there was no alimony obligation and thus no opportunity to modify. If there are instances when modification can be ordered, we must now determine when they exist.
John argues that in order for the court to have the power to modify a determinable award of alimony the court must specifically reserve the power to do so. Eckert, 299 Minn. at 124, 216 N.W. at 840. See also Gargis v. Gargis, 367 So.2d 476, 478 (Ala.Civ.App.1978) (court must reserve the power to modify a decree which provides for determinable alimony payments); Plante v. Plante, 358 N.W.2d 729, 731 (Minn.App.1984) (court can implicitly reserve power to i modify beyond term of payments if motion made prior to termination date); Mason v. Mason, 40 Wash.App. 450, 457, 698 P.2d 1104, 1106 (1985) (power to modify must be preserved in writing or expressly reserved in the decree). The trial court recognized that the power can be reserved expressly, citing 27A C.J.S. Divorce § 238 (1959).
Diane asserts that the court retains the power to modify an alimony award under the authority of Iowa Code section 598.-21(8) which provides in part:
The court may subsequently modify orders made under this section when there is a substantial change in circumstances.
In Carlson, 338 N.W.2d at 140, we stated, “Where, as here, the dissolution decree provides for alimony, Iowa Code section 598.21(8) invests the court with statutory power to make subsequent changes in alimony. In this state an order terminating, or ceasing, alimony payments neither divests the court of jurisdiction nor amends the statute that provides the power to make subsequent changes.” See also Simpson v. Simpson, 134 Cal.App.2d 219, 221-22, 285 P.2d 313, 314-15 (1955) (modification statute is incorporated into the terms of a decree when an alimony award is made for a limited time).
The modification statutes under which Doerflinger and Mason, two cases relied upon by John, were decided limit modification “to installments accruing subsequent to the motion for modification,” thus the power to modify a determinable award of alimony after the final payment could only be reserved expressly in writing in the decree. Mo.Rev.Stat. § 452.370(1) (1978 & Supp.1984); Wash.Rev.Code Annot. § 26.-09.170 (1986).
The long standing Iowa law that reservation of power to modify can be found in the decree itself or in a statute is in accord with the position taken in Carlson and Simpson, not that taken in Doerflinger and Mason. See Spain v. Spain, 177 Iowa 249, 251-53, 158 N.W. 529, 530 (1916).
The trial court did not mention section 598.21(8) in its ruling or indicate why it would not apply to this case.
We conclude, based on the above stated authorities, that because section 598.21(8) provides the court with the power to modify decrees, the court may exercise that power when an award of alimony was included in the initial decree.
Iowa statutory law, however, does not address the time at which a court’s authority to enter orders and modify decrees in a dissolution action terminates. See Iowa Code ch. 598. This court has held that remarriage does not automatically terminate the court’s authority to modify alimony; it can be continued on a showing of extraordinary circumstances. In re Marriage of Woodward, 229 N.W.2d 274, 280 (Iowa 1975). Modification may be allowed in that situation even though the decree specifically states that the right to alimony will terminate upon the death or remarriage of the recipient spouse. Id. at 276; accord In re Marriage of Shima, 360 N.W.2d 827, 828 (Iowa 1985) (remarriage).
Modification has also been allowed in the award of child support even though the support has terminated under the terms of the initial decree. In the recent case of In *396re Marriage of Pieper, 369 N.W.2d 439, 440 (Iowa 1985), the child support obligation terminated when the child reached age 18. One and one-half months after the obligation terminated, the child’s mother petitioned the court for modification of child support to extend through the child’s college years. We upheld the trial court order granting the requested modification even though the child support obligation had terminated before the modification was requested. 369 N.W.2d at 442. We reasoned that because the statute, Iowa Code section 598.1(2), allowed a potential award of child support to age 22, this court could allow modification at any time until the child reached that age. Id.
In the determinate alimony context, we believe our result should be no different from the remarriage and child support cases. When the district court has the authority to award alimony for life, but limits the award to that time frame in which support is deemed reasonably necessary, the court should not be without power to modify its alimony award on a showing by the applicant of a substantial change of circumstances. Likewise, the court should not be without authority to modify, after the specific period for alimony payments has expired, solely to promote the goals of finality and permanency of the dissolution decree.
In Smith v. Smith, 190 Mass. 573, 574, 77 N.E. 522, 522 (1906), alimony was originally awarded for two years. After full payment of that obligation and termination of support, the recipient former spouse petitioned for additional alimony. Based on the recipient’s ill health and inability to support herself, alimony was reinstated for one year. The Massachusetts Supreme Court reasoned that an award in the dissolution decree cannot be a final determination of the alimony obligation. The award should be subject to modification if circumstances change making a modification just.
There is considerable public policy support for such a result. Generally, an award of a specific number of alimony payments is to serve as a cushion while the recipient reacquires job skills and finds employment; thus, it is in the nature of rehabilitative alimony. When an event occurs which keeps the recipient from being employed, reconsideration of the alimony award may be justified.
Iowa Code section 598.21(8) allows modification of an alimony award when a party shows a substantial change in circumstances not contemplated by the court entering the dissolution decree. The Iowa Legislature in 1985 amended that section to include specific factors to guide the court in its determination of whether a substantial change in circumstances has occurred. Among the factors listed are:
c. Changes in the medical expenses of a party.
******
e. Changes in the physical or emotional health of a party.
Iowa Code § 598.21(8) (1985), amended by 1985 Iowa Acts, ch. 178, § 7 (effective July 1, 1985). This enactment, which was effective when the present modification case was tried, evinces a continuing intent by the legislature to provide financial security to a party when an unexpected calamity occurs.
On an analysis of the section 598.-21(8) factors, a court could determine that the purpose of the initial alimony award has not been served; the recipient spouse has not yet attained a position of self-support due to no fault of her own. When a court determines support is necessary, it may continue the support obligation, which has survived the dissolution of the marriage, because the obligation is grounded in public policy and cannot be bargained.away by the parties. Price v. Price, 33 N.J.Super. 545, 547, 111 A.2d 96, 97 (1955).
We can ascertain no difference, in the power of the court to modify alimony in a dissolution decree, between the situation in which the initial decree specifically reserves that power and one in which a statute like section 598.21(8) gives the court such power.
*397Therefore, we conclude the court retains the power to modify even a finite alimony award at any time when such an award was included in the initial decree. Any such modification is governed by Iowa Code section 598.21(8). Decisions will rest within the sound discretion of the district court. See Edgar v. Edgar, 366 Mich. 580, 586-87, 115 N.W.2d 286, 288 (1962) (trial court refused to reinstate alimony payments nine years after obligation terminated even though former wife was destitute and former husband was capable of making payments). In light of this power, the decision of the district court is reversed.
III. Substantial change in circumstances. The case is remanded for a determination by the district court as to the existence of a substantial change in circumstances based on the existing record and such additional record as may be appropriate due to the passage of time since trial on the modification petition. The burden of proof as to such change shall be on Diane. The court should weigh the evidence in light of the factors set forth in Iowa Code section 598.21(8), as amended.
If the court finds that a modification is in order, the modification will be effective from the filing of Diane’s petition to modify. Pucci v. Pucci, 259 Iowa 427, 431, 143 N.W.2d 353, 356 (1966).
IV. Attorney fees. Diane also has requested attorney fees in connection with her petition for modification, at both the trial and appellate court level. Iowa Code section 598.36 allows a court to award attorney fees it deems reasonable to the prevailing party. Diane has prevailed on her appeal and John should pay the reasonable attorney fees incurred by Diane on appeal in the amount requested of $501.10.
On remand, the district court shall fix the amount of attorney fees to be awarded to Diane for the prior trial on the petition for modification.
V. Disposition. We have determined that the district court has the power to rule on Diane’s petition for modification of alimony. Therefore, we remand the case to the district court for a determination of whether a modification is justified and for further appropriate proceedings. Diane’s application for appellate attorney fees is granted; her application for attorney fees concerning the prior modification proceeding and trial is remanded for consideration by the district court.
REVERSED AND REMANDED.
All Justices concur except LARSON, SCHULTZ, CARTER, and LAVORATO, JJ., who dissent.