
439 N.W.2d 651 (1989)
EMMET COUNTY STATE BANK, Appellee,
v.
Robert D. REUTTER and Janice I. Reutter, Appellants.
No. 88-1161.
Supreme Court of Iowa.
April 19, 1989.
*652 Michael R. Bovee of Greer, Montgomery, Barry & Bovee, Spencer, for appellants.
Joseph L. Fitzgibbons and Harold W. White of Fitzgibbons Bros., Estherville, for appellee.
Considered by McGIVERIN, C.J., and LARSON, SCHULTZ, LAVORATO, and ANDREASEN, JJ.
LAVORATO, Justice.
In 1985 the Iowa legislature amended Iowa Code section 524.910, which pertains to agricultural land acquired by a state bank in satisfaction of a debt previously contracted. According to the amendment, before the bank may sell such land, it must first offer the prior owner an opportunity to repurchase the land on the terms the bank proposes to sell it. The issue we are to decide is whether the amendment applies to such land that was acquired by a state bank before the amendment became effective but was sold after its effective date. The district court held that the amendment did not apply. We disagree and reverse.

I. Background Facts and Proceedings.

We glean the following facts, which are undisputed, from the summary judgment record, consisting of the pleadings, affidavits, and answers to interrogatories and requests for admissions.
On December 16, 1983, the defendants, Robert D. Reutter and Janice L. Reutter, mortgaged their 320-acre farm to the plaintiff, the Emmet County State Bank. In January 1985 the Reutters filed a Chapter 7 bankruptcy petition. In February the plaintiff offered to purchase the farm from the bankruptcy trustee. On June 17, 1985, the plaintiff acquired the farm from the trustee via a quitclaim deed for a stated consideration of $252,000.
On February 17, 1987, the plaintiff entered into a real estate contract with Chuck Umscheid, Richard Umscheid, and Delores Umscheid for the sale of the farm for $198,000. According to the contract, the Umscheids were to take possession on March 1, 1987.
The Umscheids' attorney, in a title opinion rendered the following July, raised a title objection: the plaintiff's failure to comply with Iowa Code section 524.910. In the attorney's opinion, this section required the plaintiff to offer the prior owners, the Reutters, an opportunity to repurchase the farm on the same terms it proposed to sell to the Umscheids. The attorney required a showing of compliance with section 524.910 or, in the alternative, a judicial decree quieting title in the plaintiff as to all claims of the Reutters.
Several days later, the plaintiff filed a quiet title action against the Reutters. In their answer the Reutters raised, as an affirmative defense, the plaintiff's failure to comply with section 524.910. Later, with permission of the court, the Reutters filed an amended answer and counterclaim. One count of the counterclaim sought a declaratory ruling that section 524.910 required the plaintiff to offer the Reutters an opportunity to repurchase their former property before sale to a third party. The other count sought monetary damages based on the plaintiff's alleged failure to allow the Reutters such an opportunity. It is undisputed that the plaintiff is a state bank subject to regulation by Iowa Code chapter 524.
Following discovery, the plaintiff filed a motion for summary judgment, asserting two grounds. First, the amendment to section *653 524.910, granting prior owners an opportunity to repurchase, applied only to property acquired on or after July 1, 1985, the effective date of the amendment; in other words, the amendment applied only prospectively. Second, the plaintiff purchased the property by private sale from the bankruptcy trustee, not the Reutters; hence, the amendment did not apply. The district court agreed with the plaintiff's first ground but rejected the second. The court granted the motion for summary judgment and thereafter entered a decree quieting title to the farm in the plaintiff and against the Reutters. It also dismissed, in its decree, the Reutters' counterclaim. This appeal followed.

II. Principles Governing Summary Judgment.

Ordinarily, when a ruling on a summary judgment is challenged, our task is to determine whether a genuine issue of material fact exists. Only when there is no such issue is the motion properly granted. On the other hand, when the facts are undisputed and the only issue is what legal consequences flow from those facts, entry of summary judgment is proper. See Moritz v. Maack, 437 N.W.2d 898, 901 (Iowa 1989).
Here the facts are undisputed, and the only issue is one of law. Thus, our task is to determine whether the district court correctly applied the law.
III. Does the 1985 Amendment to Section 524.910 Apply to the Umscheid Sale?
Before the 1985 amendment, section 524.910 provided in pertinent part:
A state bank may acquire property of any kind to secure, protect or satisfy a loan or investment previously made in good faith. Property acquired pursuant to this section shall be held and disposed of subject to the following conditions and limitations:
....
2. Real property purchased by a state bank at sales upon foreclosure of mortgages... owned by it, ... or such real property as shall be conveyed to it in satisfaction of debts previously contracted in the course of its business ... shall be sold or otherwise disposed of by the state bank within one year after title is vested in the state bank, unless the time is extended by the superintendent.
The 1985 amendment allowed state banks to hold property for five years rather than one and added the following pertinent language to subsection two:
Before the state bank sells or otherwise disposes of agricultural land held pursuant to this subsection, the state bank shall first offer the prior owner the opportunity to repurchase the agricultural land on the terms the state bank proposes to sell or dispose of the agricultural land.
1985 Iowa Acts ch. 252, § 34. We have held that this opportunity to repurchase is enforceable via a suit by a private party. Black v. First Interstate Bank, 439 N.W. 2d 647, 650 (Iowa 1989). We have also held that the opportunity is assignable. Id. at 651.
In concluding that the 1985 amendment to section 524.910 did not apply to the Umscheid sale, the district court relied on a prospective-retrospective application analysis. The rules that come into play under such an analysis are summarized in State ex rel. Turner v. Limbrecht:
When a statute is newly enacted it may be applied prospectively only or it may be applied both prospectively and retrospectively. Legislative intent determines which of these two applications is to be given. In determining such intent, "[the] general rule is that [a statute] operates prospectively only unless it clearly appears the legislature intended the law to have retrospective effect." This basic rule is however not without exceptions. "The rule is subject to an exception where the statute relates solely to remedy or procedure. If a statute relates to a substantive right, it ordinarily applies prospectively only. If it relates to remedy or procedure, it ordinarily applies both prospectively and retroactively." *654 246 N.W.2d 330, 332 (Iowa 1976) (citations omitted), overruled on other grounds, State ex rel. Miller v. Hydro Mag, Ltd., 436 N.W.2d 617, 622 (Iowa 1989).
In applying these rules, the district court determined that the amendment contains no language as to either prospective or retrospective application. It concluded that the amendment applied prospectively only because it was substantive legislation, creating substantive rights which prior to the amendment did not exist.
We think the district court got off on the wrong foot in its analysis. The legislature's failure to expressly state in the amendment whether it was to have retrospective or prospective application is not determinative. See Schnebly v. St. Joseph Mercy Hospital, 166 N.W.2d 780, 782 (Iowa 1969) (intent to give statute retrospective or prospective application may be expressed in the statute or implied from its language).
The determination instead boils down to whether the legislature intended to give the amendment here retrospective or prospective application. To make that determination, our cases have developed a three-part test. First, we look to the language of the new legislation; second, we consider the evil to be remedied; and third, we consider whether there was a previously existing statute governing or limiting the mischief which the new legislation was intended to remedy. In re Incorporation of Town of Avon Lake, 249 Iowa 1112, 1118, 88 N.W.2d 784, 787 (1958); Appleby v. Farmers State Bank, 244 Iowa 288, 294-95, 56 N.W.2d 917, 921 (1953).
Turning to the language of the amendment, we think the following language in it implies retrospective application:
Before the state bank sells or otherwise disposes of agricultural land held pursuant to this subsection, the state bank shall first offer the prior owner the opportunity to repurchase the agricultural land on the terms the state bank proposes to sell or dispose of the agricultural land.
(Emphasis added.) The clear import of the italicized words is that the amendment applies to agricultural land owned by a state bank on the effective date of the amendment, regardless of when the land was acquired. There is nothing in the language of the amendment restricting its meaning to agricultural land held as of a subsequent date. The amendment makes no exception. Cf. Appleby, 244 Iowa at 295, 56 N.W.2d at 921 (the language "any sheriff's certificate of sale" in newly enacted statute implied retrospective application to all sheriff's certificates outstanding on the date of the new legislation); Aetna Ins. Co. v. Chicago G.W.R. Co., 190 Iowa 487, 489, 180 N.W. 649, 651 (1920) (the language "any provision in any lease or contract to the contrary notwithstanding" in newly enacted statute implied retrospective application to all leases containing a provision in conflict with the statute).
As to the evil sought to be remedied, we need simply look to the bill containing the amendment and to the conditions existing before and at the time of the amendment's passage. See Appleby, 244 Iowa at 295, 56 N.W.2d at 921 (in construing statute, "`[i]t is important to consider the state of the law before it was enacted, and the evil it was designed to remedy'"). The bill, Senate File 577, encompasses numerous provisions. Significantly, the title of the bill begins, "An Act relating to the economy of the State of Iowa." Section two of the bill lists nine legislative findings. We set forth four of the findings, which we think bear on our question:
The general assembly finds and declares as follows:
....
3. There exists a serious problem in this state regarding the ability of farmers and small businesses to obtain adequate affordable operating loans and to service the debt on existing operating, machinery, and land loans.
....
5. The inability of farmers and small businesses to obtain adequate affordable operating loans and to service the debt on existing operating, machinery, and *655 land loans is conducive to economic decline and poverty....
....
7. A major cause of the unavailability of adequate affordable operating loans... is the unstable economic condition of the state....
8. A stable economic condition is necessary to encourage and facilitate the availability of adequate affordable operating loans [to farmers and small businesses]....
1985 Iowa Acts ch. 252, § 2.
The stated purpose of this omnibus legislation is "to maximize the economic potential of the state and to thereby stabilize the economic condition of the state." Id.
Besides the amendment to Iowa Code section 524.910, Senate File 577 establishes a state agency to undertake programs providing assistance for farming and small businesses; allows the debtor and the mortgagee of agricultural land to extend, after the filing of a foreclosure action, the period of redemption up to five years; and allows for an alternative nonjudicial voluntary foreclosure procedure. The last provision is geared to reducing the cost of foreclosure proceedings while at the same time providing protection to both the debtor and the mortgagee. This laudable purpose is accomplished by allowing the voluntary transfer of land to a mortgagee without a foreclosure action. See Black, 439 N.W.2d at 650.
Thus, it is clear from the legislative findings in Senate File 577 and from the several provisions mentioned that the legislature was deeply concerned about the severe economic hardships Iowa farmers have endured these past ten years and was determined to do something about it. We take judicial notice of the numerous farm foreclosures resulting in loss of farms that for generations were family-held. Cf. Appleby, 244 Iowa at 296, 56 N.W.2d at 922 (when considering whether statute had retrospective or prospective application, judicial notice taken of economic conditions and especially of land foreclosures).
The amendment here was part of the legislature's attempt to remedy the problem of numerous farm foreclosures. See Black, 439 N.W.2d at 650 (viewing Senate File 577 as a whole, it is apparent that this amendment is "part of the fabric of the Alternative Nonjudicial Foreclosure Procedure"). The amendment was clearly intended to reduce foreclosure losses by making it possible for affected farmers to regain their farms. Retrospective rather than prospective application of the amendment would better serve this purpose. The legislature knew that, and we think that is what it intended.
Prior to the amendment there was no existing legislation designed to alleviate or remedy this mischief in a similar way. The mischief existed at the time the amendment was enacted, and no good reason appears why the legislature should have intended to remedy only a part rather than all of it. Cf. Avon Lake, 249 Iowa at 1119, 88 N.W. 2d at 788, (newly enacted municipal incorporation statute interpreted to apply to pending petition to incorporate; no prior similar legislation had existed); Appleby, 244 Iowa at 297, 56 N.W.2d at 922 (newly enacted limitation statute interpreted to apply to sheriff's certificate held at time of enactment; no prior similar legislation had existed).
One further matter merits our attention. The plaintiff contends here, as it did in the district court, that the amendment did not apply to the Reutter farm because the plaintiff had purchased it by private sale from the bankruptcy trustee. Like the district court, we find the contention without merit and reject it.
The plaintiff offered to purchase the farm from the trustee for a purchase price of $252,000 to be paid as follows: (1) cash payment of $147,914.39 to the Federal Land Bank for release of its real estate mortgage against the farm and (2) a satisfaction and discharge of the Reutters' mortgage to the plaintiff in an amount equal to the difference between $252,000 and the amount actually paid to the Federal Land Bank.
As we noted earlier, section 524.910 applies to real property conveyed to a state bank in satisfaction of debts previously contracted in the course of its business.
*656 Clearly, a part of the purchase price in the plaintiff's offer to the trustee was the partial satisfaction of the Reutters' mortgage, a mortgage that had been contracted with the plaintiff in the course of its banking business. The following language in the trustee's quitclaim deed conveying the Reutter farm to the plaintiff supports our conclusion: "Deed is a Conveyance of Real Property To Lienholders In Lieu of Foreclosure Action."

IV. Disposition.

The legislature intended the 1985 amendment to Iowa Code section 524.910 to have retrospective application. Consequently, the district court erred in concluding otherwise. Because it incorrectly applied the law to the undisputed facts, it should not have (1) sustained the plaintiff's motion for summary judgment, (2) dismissed the Reutters' counterclaim, and (3) quieted title in the plaintiff and against the Reutters' claims. The court, however, did correctly reject the plaintiff's contention that the amendment was inapplicable because the plaintiff had purchased the farm by private sale from the bankruptcy trustee.
We reverse the decree of the district court and remand for further proceedings.
REVERSED AND REMANDED.
