
489 N.W.2d 1 (1992)
ADAIR BENEVOLENT SOCIETY, Appellant,
v.
STATE of Iowa, INSURANCE DIVISION of the State of Iowa, Appellee.
No. 91-1077.
Supreme Court of Iowa.
July 22, 1992.
*2 Martin L. Fisher, Adair, for appellant.
Fred M. Haskins, Asst. Atty. Gen., Ins. Div., for appellee.
Considered by McGIVERIN, C.J., and CARTER, LAVORATO, NEUMAN, and SNELL, JJ.
LAVORATO, Justice.
Iowa Code chapter 512A (1989) regulates benevolent associations and prohibits their incorporation after July 1, 1988. In this judicial review proceeding, a benevolent society alleged that chapter 512A is unconstitutional because it (1) is an ex post facto law, and (2) impermissibly impairs the right to contract. The district court disagreed and upheld the administrative agency's decision. We affirm.

I. Factual Background.

The Adair Benevolent Society was founded in 1941 by chiropractor B.L. Meurer. It is a sole proprietorship family business. Originally located in Adair, Iowa, the Society's headquarters were moved to Orange City, Florida, in 1963.
The business is currently owned by Meurer's daughter-in-law who lives in Georgia. Meurer's grand-daughter-in-law manages the business.
The Society has about 1500 members who are Iowa residents. The Society functions as a clearinghouse for disbursing assessments from members to beneficiaries of deceased members.
Members are divided into clubs based on age at the time of membership. When a club member dies, the Society assesses each surviving member of the club one dollar plus a thirty-cent handling fee. The Society forwards the assessments received to the decedent's designated beneficiary or beneficiaries. The amount a beneficiary receives ranges from $750 to $1500, depending upon the club the deceased had joined.
Such assessments have occurred as recently as 1990. The Society may send assessment notices as often as once every six weeks, depending upon the death rate of each club's membership. The Society sends no more than six individual assessments ($7.80) in each notice.
Although it has been doing business continually in Iowa since its inception in 1941, the Society is not an authorized benevolent association under Iowa law. Nor is it a registered insurance company in this state.

II. Procedural Background.

On June 13, 1990, the insurance division of the state of Iowa filed an administrative notice of hearing. The notice alleged that the Society was an insurer and was not licensed for that purpose under the Unauthorized Insurers Act, Iowa Code chapter 507A. The notice further alleged that the Society was an unauthorized benevolent society, in violation of chapter 512A. The division requested (1) entry of a cease-and-desist *3 order, (2) transfer of existing members to licensed benevolent associations, and (3) imposition of a civil penalty under chapter 507A.
At the administrative hearing, the Society alleged that chapter 512A was unconstitutional because it (1) is an ex post facto law, and (2) impairs the right to contract. On these bases the Society asked for alternative forms of relief: (1) allow the Society to continue in business as it had in the past, or (2) allow it to incorporate and become a licensed benevolent association.
The administrative law judge (ALJ) entered an order in which he stated he was not empowered to rule on constitutional issues. The ALJ went on to rule that the Society was an unauthorized insurer and ordered the Society to cease doing business in Iowa. In addition, the ALJ ordered the Society to turn over its Iowa membership rolls to the division so that the division could place them with benevolent societies licensed to do business in Iowa.
The Society appealed to the district court for judicial review. The district court reached the constitutional issues the Society had earlier raised, decided those issues against it, and affirmed the ALJ's decision.
The Society appealed, again raising the same constitutional issues.

III. Scope of Review.

A district court's review of agency action is restricted to determining whether the petitioner's substantial rights have been prejudiced because the agency action violates one of seven criteria set out in Iowa Code section 17A.19(8). The issues in this case involve application of one of those criteria: whether the agency action was in violation of constitutional provisions. See Iowa Code § 17A.19(8)(a). In our review of the district court's decision, we apply section 17A.19(8)(a) to the agency action complained of to determine whether our conclusions are the same as those of the district court. Norland v. Iowa Dep't of Job Serv., 412 N.W.2d 904, 908 (Iowa 1987). If our conclusions are the same, we affirm; if they are not, we reverse. Id.
Usually when fact questions in a contested case are involved, we apply the substantial evidence standard under section 17A.19(8)(f). But because constitutional issues are raised here, our review is de novo. Knepper v. Monticello State Bank, 450 N.W.2d 833, 835 (Iowa 1990).
When the legitimacy of a statute is questioned, we presume the legislature intended the statute to comply with the state and federal constitutions. See Iowa Code § 4.4(1). Because the constitutionality of legislative acts is presumed, the Society bears the heavy burden of proving the challenged provisions of chapter 512A are unconstitutional beyond a reasonable doubt. Federal Land Bank of Omaha v. Arnold, 426 N.W.2d 153, 156 (Iowa 1988). Moreover, "[i]t is our duty to construe acts of the legislature, where it can reasonably be done, so that their constitutionality will be upheld." Spurbeck v. Statton, 252 Iowa 279, 285, 106 N.W.2d 660, 663 (1960).
For reasons that follow, we are not convinced that the Society has met this burden on either constitutional claim.

IV. The Challenged Statutory Provisions.

Iowa Code chapter 512A became effective July 1, 1967. See 1967 Iowa Acts ch. 368. Three sections of this chapter are relevant here. The first describes the incorporation requirement:
512A.3 Incorporation mandatory.
Before a benevolent association shall operate in this state it shall first incorporate in accordance with the laws of this state....
Iowa Code § 512A.3.
The second prescribes the consequences for failing to incorporate:
512A.8 Penalties.
Except as otherwise provided by law, it shall be unlawful for any person or corporation to operate a benevolent association in this state except as provided for in this chapter. Any person violating the *4 provisions of this chapter shall be guilty of a serious misdemeanor.
Iowa Code § 512A.8.
The last sectionenacted in 1988sets a time limit on when a benevolent association may incorporate:
512A.9 Incorporation of benevolent associations prohibited.
Notwithstanding any provision of this chapter to the contrary, a benevolent association shall not be incorporated or reincorporated in this state on or after July 1, 1988. A benevolent association incorporated before July 1, 1988, continues to be subject to the provisions of this chapter.
Iowa Code § 512A.9.
We now turn to the Society's constitutional claims.

V. The Ex Post Facto Claim.

The gist of the Society's first challenge is that the quoted sections of chapter 512A violate the ex post facto provisions of the federal and state constitutions. The federal Constitution contains two ex post facto clauses: one that applies to the states and one that applies to the federal government. See U.S. Const. art. I, § 10, cl. 1 ("No State shall ... pass any ... ex post facto Law."); U.S. Const. art. I, § 9, cl. 3 ("No ... ex post facto Law shall be passed."). Our ex post facto provision simply provides that "[n]o ... ex post facto law ... shall ever be passed." Iowa Const. art. I,§ 21.
On a number of occasions this court has held that legislation violates the ex post facto clauses of both the federal and Iowa constitutions when it
punishes as a crime an act previously committed, which was innocent when done, which makes more burdensome the punishment for a crime, after its commission, or which deprives one charged with crime of any defense available according to [the] law at the time when the act was committed.
State v. Soppe, 374 N.W.2d 649, 652 (Iowa 1985) (quoting Beazell v. Ohio, 269 U.S. 167, 169-70, 46 S.Ct. 68, 68, 70 L.Ed. 216, 217 (1925)); State v. Anderson, 338 N.W.2d 372, 375 (Iowa 1983); see also In re Ponx, 276 N.W.2d 425, 428 (Iowa 1979); State v. Quanrude, 222 N.W.2d 467, 469-70 (Iowa 1974).
We recently applied this rule in State v. Kaster, 469 N.W.2d 671, 673-74 (Iowa 1991). There, while the defendant's criminal case for fishing violations was under submission, the legislature increased the fine that could be imposed for the number of fish illegally taken. The district court on sentencing used the enhanced fine. We recognized the enhanced fine as punitive which brought it clearly within "the rule prohibiting ex post facto enhancement of fines." Kaster, 469 N.W.2d at 674.
The only question involved here is whether or not the statute punishes an act which was legal when committed. We believe the Society is not being punished for any acts prior to the enactment of chapter 512A in 1967. Only its acts since that date are being challenged. The United States Supreme Court long ago determined that the ex post facto clauses of the federal Constitution do not prevent a legislature from imposing a penalty for continuing once lawful conduct that the legislature has subsequently declared illegal. Samuels v. McCurdy, 267 U.S. 188, 193, 45 S.Ct. 264, 265, 69 L.Ed. 568, 570 (1925) (statute making possession of liquor lawfully acquired unlawful is not ex post facto so far as it affects continued possession in the future).

VI. The Impairment of Contract Claim.

The Society's second constitutional claim is that the challenged provisions of chapter 512A impair its ability to contract guaranteed it under the federal and state constitutions. The federal Constitution provides that "[n]o State shall ... pass any... Law impairing the Obligation of Contracts." U.S. Const. art. I, § 10, cl. 1. The Iowa constitution similarly provides that "[n]o ... law impairing the obligation of contracts shall ever be passed." Iowa Const. art. I, § 21.
The Society thinks there is no legitimate reason for having a cut-off date for incorporation *5 under section 512A.9. The Society contends that in effect the statute interferes with its membership contracts, some of which date back to 1941. The division counters that the public interest demands such a cut-off.
Preliminarily, we note that the guarantee of the contract clause in the federal and state constitutions must yield to a reasonable exercise of the police power for the public good. See Atlantic Coast Line R.R. v. City of Goldsboro, 232 U.S. 548, 558, 34 S.Ct. 364, 368, 58 L.Ed. 721, 726 (1914) (all contract and property rights are held subject to the fair exercise of the police power); accord Amana Soc. v. Colony Inn, Inc., 315 N.W.2d 101, 112 (Iowa 1982). Were this not so, "one would be able to obtain immunity from state regulation by making private contractual arrangements." Exxon Corp. v. Eagerton, 462 U.S. 176, 190, 103 S.Ct. 2296, 2305, 76 L.Ed.2d 497, 510 (1983).
In Arnold, 426 N.W.2d at 159, we adopted a three-step analysis for evaluating contract clause challenges to legislation:
(1) If the state law operates as a substantial impairment of a contractual relationship,
(2) the state must have a significant and legitimate public purpose behind the regulation, which
(3) adjusts the contracting parties' rights and responsibilities based on reasonable conditions appropriate to the public purpose.
Steps two and three deal, of course, with the police power of the state.
Assuming without deciding that the "contracts" between the Society and its members have been impaired, we nevertheless think there is a significant and legitimate public purpose behind the challenged provisions. We agree with the division and the district court that chapter 512A is intended to "protect the public from the instabilities [that] are characteristic of benevolent societies."
The district court wisely noted one plausible explanation for enactment of section 512A.9, the cutoff provision for incorporation:
one inherent problem [that] arises is that as the members of a particular club age and [the club] decreases in size, assessments sharply increase and can be prohibitive for the remaining members to pay. Members tend to drop out, leaving the remaining members without benefits, causing forfeiture of assessments already paid. Added to this is the fact that members are not legally obligated to pay assessments, even after receiving notice under 191 Iowa Administrative Code section 8.4(1). Under these circumstances, it is apparent why the legislature has sought to prohibit the licensing of benevolent societies under [section] 512A.9.
Long ago our court illustrated the same shortcoming this way:
Mutual insurance has its own natural limitations. It is not the equivalent of what is usually known as "old line" insurance. It can give no guarantee. It has no assets, and is entitled to none. Whatever it collects belongs to some beneficiary of a death loss. It has the merit of cheapness and the demerit of uncertainty.... We are told that, when [the defendant-fraternal beneficiary association] first came into being, it was simply an undertaking by approximately 2000 persons that, while his membership continued, each would pay a dollar to the beneficiary of every death loss.... The first man died, and the surviving 1999 paid their dollars. This proved to be insurance, at least for the first man.... If this membership were to remain stationary, surely the last man could not hope for any benefits to his beneficiary. His only hope would rest upon the continuing increase of the association and the taking in of new members .... [I]t is of the very essence of mutual insurance and of the efficiency thereof that it shall grow, and that it shall continue to receive new and younger blood. This is the only chance for the two thousandth man. When growth sickens or dies, mutual insurance depreciates accordingly. *6 Tusant v. Grand Lodge, 183 Iowa 489, 504-05, 163 N.W. 690, 694 (1917). One administrative regulation attempts to guard against this particular risk by requiring a licensed benevolent association to merge with other licensed benevolent associations when membership falls below fifty percent of its size as set forth in the plan of operation. See 191 Iowa Admin.Code § 8.9 (1986).
The financial risks inherent in benevolent societies are highlighted when comparing them to "level premium" life insurance companies operating in this state. For example, level premium life insurance companies maintain mortality-based reserves to keep premiums for funding death benefits constant. In contrast, benevolent societies have no surplus and reserve requirements. Compare Iowa Code section 508.1 (1991) (covering "[e]very life insurance company upon the level premium ... plan"); sections 508.5 and 508.9 (requiring such company to maintain combined capital and surplus of $5,000,000); and section 508.36(1) (requiring "reserves for all outstanding life insurance policies") with Iowa Code section 512A.6 (benevolent "associations may operate without the establishment of reserves or surplus").
Obviously, the $5 million surplus requirement for chapter 508 life insurance companies is to protect policyholders from potential insolvency of the company. If such insolvency does occur, a guaranty association, made up of all licensed insurers, assumes the obligations of the insolvent insurer. See generally Iowa Code ch. 508C. Members of benevolent societies have no such protection because benevolent societies are excluded from this association. See Iowa Code § 508C.3(3)(e).
In the late 1920s, this court upheld a mutual assessment company's decision to become a legal reserve or level premium company under permissive legislation. See Wall v. Bankers Life Co., 208 Iowa 1053, 1068, 223 N.W. 257, 264 (1929). Under the permissive legislation, level premium holders were not subject to assessment to pay death losses of the old assessment certificate holders. Id., 223 N.W. at 265. This court held that such a result did not constitute an unconstitutional impairment of contract. Id., 223 N.W. at 264. Significantly, the court based its decision on the financial instability of mutual assessment companies and on the fact that mutual assessment schemes are actuarially unsound. Id. These two factors led the court to view the permissive legislation as "necessary for the public good." Id.
The significance of the Wall decision is that mutual assessment companies and benevolent societies operate on the same principle: They rely on voluntary assessments to pay death benefits. Both share a common scheme: success based on continual growth in membership, especially younger membership. The inherent financial instability and uncertainty of such a scheme was graphically illustrated earlier in the cited language from Tusant.
For all these reasons, we agree with the district court that guaranteeing the financial integrity of an insurer is a legitimate exercise of the State's police power for the public good.
That leaves the final prong of the three-step analysis in Arnold: whether the impairment of the parties' contractual rights and obligations is based on reasonable conditions and of a character appropriate to the public purpose. The district court ordered the transfer of existing contracts to other benevolent societies that are properly licensed and regulated under state law. So members are allowed to continue their contracts if they wish, but under less risky conditions. We think this is reasonable and appropriate, given the legitimate public purpose of protecting those who wish to join benevolent societies.
We concede that the Society finds itself between a rock and a hard place. Because it can no longer qualify as a licensed benevolent society in Iowa, it must choose another statutory route of incorporation to stay in business here. See, e.g., Iowa Code ch. 508. However, we fail to see how this may potentially drive the Society out of business completely, as it seems to imply. We say this because the Society's own exhibits boast a membership of 12,000 people.
*7 Only 1500 are in Iowa. We seriously doubt that a loss of 1500 members will mean the demise of the Society.
Though we recognize the dilemma facing the Society, we also recognize this dilemma is of the Society's own making. The Society had between July 1, 1967, and July 1, 1988twenty-one yearsto bring itself into compliance with chapter 512A. This goes far to soften the blow the Society complains of now.

VII. Disposition.

We hold that the Society has failed to prove beyond a reasonable doubt that the challenged provisions of Iowa Code chapter 512A are constitutionally infirm. These provisions are not ex post facto, and they do not impermissibly impair the right to contract. We affirm the decision of the district court that came to the same conclusion.
We have considered all the remaining arguments and contentions the Society has raised whether we have addressed them or not, and find them without merit.
AFFIRMED.
