OPINION
PARKER, Judge.Respondent Jeffrey Howard has owned a game farm in Plymouth, Minnesota, since March 1982. In May 1982 Plymouth passed an ordinance prohibiting the keeping of wild animals in the city and subsequently notified Howard that he must remove his animals. Howard succeeded in enjoining enforcement of the ordinance while he contested its constitutionality. In the meantime he was prosecuted for violating a zoning ordinance by operating the game farm and was acquitted. After a district court found the “wild animal ordinance” constitutional, the State charged Howard with violating it and a public nuisance ordinance.
In response to Howard’s pretrial motions, the trial court dismissed the “wild animal ordinance” and public nuisance charges as violations of the ex post facto doctrine and Minn.Stat. § 609.035 (1982), respectively. We reverse in part and remand in part.
FACTS
Jeffrey Howard moved onto property in Plymouth, Minnesota, in March 1982 and began raising wild animals for sale as exotic pets. Many different animals are kept on the property, including cougars, wolves and foxes.
Subsequently the city received several complaints from Howard’s neighbors about the safety of his operation. On May 17, 1982, the Plymouth City Council adopted Ordinance No. 82-14 prohibiting the keeping of animals “wild by nature” in the city (the “wild animal ordinance”). Plymouth City Code ch. IX, § 915.23 (1982). On May 19,1982, Howard was notified that he must remove all wild animals on his property by June 1, 1982. Howard obtained a temporary injunction enjoining Plymouth from *639enforcing the ordinance until a trial on the merits could be held.
In August 1982 Howard was charged in Hennepin County Municipal Court with violating Plymouth zoning ordinance § 7, subdivision C, by operating a business on premises zoned “Future Restricted Developments” without obtaining a conditional use permit. In May 1983 Howard was acquitted.
In July 1983 the Plymouth “wild animal ordinance” was found constitutional, and the temporary injunction was quashed.
Following the execution of a search warrant at Howard’s premises in September 1983, Howard was again charged in Henne-pin County Municipal Court with six violations of the Plymouth City Code, including public nuisance and harboring a wild animal.
In response to Howard’s pretrial motion, the trial court dismissed the harboring a wild animal charge on the ground it operated as an an ex post facto law and dismissed the public nuisance charge under Minn. Stat. § 609.035 (1982).
ISSUES
1. Does the ex post facto doctrine bar Howard’s prosecution for post-enactment violations of the “wild animal ordinance” when his violative conduct originated before enactment and was continuous?
2. Does Minn.Stat. § 609.035 bar Howard’s prosecution for violating a public nuisance ordinance after he was acquitted of violating a zoning ordinance, when both charges arose out of his operation of a game farm?
DISCUSSION
The State appeals pursuant to Rule 28 of the Minnesota Rules of Criminal Procedure. The State must demonstrate “clearly and unequivocally that the trial court has erred in its judgment and that, unless reversed, the error will have a critical impact on the outcome of the trial.” State v. Kline, 351 N.W.2d 388, 390 (Minn.Ct.App.1984) (quoting State v. Webber, 262 N.W.2d 157, 159 (Minn.1977)).
I
Both the United States and Minnesota Constitutions prohibit the passing of ex post facto laws. See U.S. Const, art. I, § 10, cl. 1; Minn. Const, art. I, § 11. An ex post facto law is “one which renders an act punishable in a manner in which it was not punishable when it was committed.” Starkweather v. Blair, 245 Minn. 371, 386, 71 N.W.2d 869, 879 (1955). In Starkweather the court quoted the leading case, Calder v. Bull, 3 U.S. (3 Dall.) 386, 390, 1 L.Ed. 648 (1978), regarding the meaning and intention of the prohibition:
[T]hat the Legislatures of the several states, shall not pass laws, after a fact done by a subject, or citizen, which shall have relation to such fact, and shall punish him for having done it. The prohibition considered in this light, is an additional bulwark in favour of the personal security of the subject, to protect his person from punishment by legislative acts, having a retrospective operation.
Starkweather at 387, 71 N.W.2d at 880 (emphasis deleted).
Howard argues and the trial court ruled that because the “wild animal ordinance” was passed after Howard began operating his game farm and because his operation was a continuous course of conduct, the ordinance operates as an ex post facto law as applied to him. The State contends the ex post facto doctrine is not applicable because it is only prosecuting Howard for conduct occurring after the ordinance was adopted.
Samuels v. McCurdy, 267 U.S. 188, 45 S.Ct. 264, 69 L.Ed. 568 (1925), supports the State’s position. In Samuels the plaintiff's liquor supply was seized pursuant to a Georgia statute that made it illegal for an individual to keep intoxicating beverages for any purpose. In an action to recover the liquor and prevent its destruction the plaintiff argued that the law under which the liquor was seized was an ex post facto law because it was passed after he lawfully *640acquired the liquor, which he continuously possessed thereafter. The Supreme Court found:
This law is not an ex post facto law. It does not provide a punishment for a past offense. It does not fix a penalty for the owner for having become possessed of the liquor. The penalty it imposes is for continuing to possess the liquor after the enactment of the law. It is quite the same question as that presented in Chicago & Alton R. Co. v. Tranbarger * * *. There a Missouri statute required railroads to construct water outlets across their rights of way. The railroad company had constructed a solid embankment twelve years before the passage of the act. The railroad was penalized for noncompliance with the statute. This court said:
“The argument that in respect to its penalty feature the statute is invalid as an ex post facto law is sufficiently answered by pointing out that plaintiff in error is subjected to a penalty not because of the manner in which it originally constructed its railroad embankment, nor for anything else done or omitted before the passage of the act of 1907, but because after that time it maintained the embankment in a manner prohibited by that act.”
Id. 267 U.S. at 193, 45 S.Ct. at 265 (emphasis added). Accord United States v. Alvarado-Soto, 120 F.Supp. 848 (S.D.Cal.1954); State v. Bernhard, 173 Mont. 464, 568 P.2d 136 (1977).
The principle espoused in Samuels is equally applicable to this case. In both cases individuals began a course of conduct before a statute was enacted that rendered the conduct illegal. Subsequently the individuals were prosecuted for the same conduct committed after enactment even though their course of conduct was continuous.
The policy underlying this principle is sound because otherwise the State would be prevented from enforcing, through the criminal process, any laws that change the legality of conduct that had previously been conducted and was of a continuous nature.
Howard argues that Samuels and Bern-hard are distinguishable because those cases did not involve a statute applying solely to one individual at the time of its enactment. The constitutionality of a law of general applicability is not determined by the number of people affected by it. See Tepel v. Sima, 213 Minn. 526, 536, 7 N.W.2d 532, 537 (1942). Moreover, in Star-kweather v. Blair the Minnesota Supreme Court stated:
We have frequently held that the motives of the legislative body in enacting any particular legislation are not the proper subject of judicial inquiry. * * * As long as the legislature does not transcend the limitations placed upon it by the constitution, its motives in passing legislation are not the subject of proper judicial inquiry.
245 Minn, at 379-80, 71 N.W.2d at 875-76 (footnote omitted). In Howard v. City of Plymouth, D.C. File No. 791692 (Hennepin Cty. Dt. Ct. July 14, 1983), the court concluded that Plymouth had the authority to pass the “wild animal ordinance,” a law of general applicability, and that the ordinance did not violate any state statutes or constitutional provisions. Specifically, the court ruled that the ordinance was not an unlawful taking without compensation, and the parties did not appeal that case. Thus, that challenge is not properly before us; similarly, Plymouth’s motives in passing the law do not affect the outcome in this case.
Howard also makes an equitable argument that Plymouth would be precluded from eliminating his pre-existing business without invoking eminent domain if this were a civil zoning proceeding, see Hooper v. City of St. Paul, 353 N.W.2d 138, 140 (Minn.1984); therefore, it would be unjust to allow Plymouth to achieve the same end by use of a criminal prosecution. The probable outcome of a prosecution for a zoning violation is irrelevant to this action, which seeks to enforce an ordinance adopted to protect the public health and *641welfare. Therefore, we hold that prosecution of Howard under Plymouth city ordinance 82-14, the “wild animal ordinance,” does not violate the ex post facto doctrine.
II
The trial court dismissed the State’s public nuisance charge under Minn.Stat. § 609.035 (Supp.1983), which provides:
[I]f a person’s conduct constitutes more than one offense under the laws of this state, he may be punished for only one of the offenses and a conviction or acquittal of any one of them is a bar to prosecution for any other of them. All the offenses, if prosecuted, shall be included in one prosecution which shall be stated in separate counts.
(Emphasis added).
The protection of Minn.Stat. § 609.-035 applies to all criminal prosecutions including municipal ordinance violations. State v. White, 300 Minn. 99, 102-03, 219 N.W.2d 89, 91 (1974); see also City of St. Paul v. Whidby, 295 Minn. 129, 144, 203 N.W.2d 823, 832 (1972).
Under the statute, “if two offenses * * * are committed in a unitary course of criminal conduct, then the state should join the * * * prosecution[s] in a single prosecution * * *.” State v. Zuehlke, 320 N.W.2d 79, 81 (Minn.1982) (citing State v. Reiland, 274 Minn. 121, 142 N.W.2d 635 (1966)). See also State v. Krech, 312 Minn. 461, 252 N.W.2d 269, 274 (1977). The “underlying policy [of the statute] is to protect an accused from being unduly harassed by repeated prosecutions for the same conduct until a desired result is accomplished.” State v. Johnson, 273 Minn. 394, 400, 141 N.W.2d 517, 522 (1966) (footnote omitted).
The test for determining whether conduct is unitary or divisible differs depending on whether criminal intent is an essential element of the offenses. In State v. Zuehlke the court said:
The approach which we have followed under section 609.035 in determining whether nonintentional crimes * * * were part of the same course of conduct is to analyze the facts and determine whether the offenses “[Arose] out of a continuing and uninterrupted course of conduct, manifesting an indivisible state of mind or coincident errors of judgment. ” State v. Sailor, 257 N.W.2d 349, 352 (Minn.1977); State v. Johnson, 273 Minn. 394, 405, 141 N.W.2d 517, 525 (1966). The approach used in determining whether two or more intentional crimes were part of the same course of conduct is to focus on the factors of time and place and also to consider whether the segment of conduct involved was motivated by an effort to obtain a single criminal objective. Id. at 404, 141 N.W.2d at 525.
320 N.W.2d at 81-82 (emphasis added).
In this case, the trial court found intent was not a factor in the crimes charged. Therefore, the broader test articulated in State v. Sailor applies. The State argues the statute does not apply to this case because Howard is being prosecuted now for conduct which occurred on September 28, 1983, whereas the zoning ordinance prosecution was for conduct which occurred in 1982. Thus, the State emphasizes the element of time in the conduct. However, the broader test de-emphasizes the importance of the time element in determining whether two offenses were part of the same course of conduct. Instead, the emphasis lies in the continuous nature of the conduct indicating a single state of mind.
The trial court ruled Howard’s conduct in running the game farm represented a continuing and uninterrupted course of conduct and an indivisible state of mind which could have resulted in both zoning and nuisance ordinance charges in 1982 when the State charged only the zoning violation. If this is correct, Minn.Stat. § 609.035 bars Howard’s prosecution for public nuisance.
However, at oral argument the State argued Howard’s course of conduct in 1982 and 1983 was not the same. The State argued, outside the record, that the nature of Howard’s game farm had changed be*642cause some animals that were babies at the time of the 1982 complaint had grown. The State also claimed some of Howard’s animals had escaped from the farm. Howard denied this allegation. There was also the suggestion that conditions at the farm had deteriorated so that neighbors were bothered by odors emanating from the farm.
It appears these allegations were not brought to the trial court’s attention before it dismissed the State’s public nuisance charge. We believe that if different facts or circumstances exist, as alleged by the State, since the 1982 zoning ordinance charge, a public nuisance charge would not necessarily be barred by Minn.Stat. § 609.-035.
DECISION
We reverse the trial court’s ruling that the ex post facto doctrine prohibits Howard’s prosecution under Plymouth’s “wild animal ordinance.” We remand for findings of fact as to whether a substantial change in Howard’s operation has occurred which would permit the State to bring a public nuisance charge.
Reversed in part and remanded in part.
POPOVICH, C.J., dissents.