delivered the opinion of the court:
On November 4, 1986, in the election for sheriff of Bond County, the official canvass disclosed that William Gribble, the plaintiff, and Bill Willeford, the defendant, each received 2,912 votes from the voters of that county. In compliance with section 23 — 27 of the Election Code (the Code) (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 27), a coin toss was held on November 10, 1986, which was won by the incumbent candidate Willeford. On November 17, 1986, pursuant to section 23 — 20 of the Code (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 20), Gribble filed a petition to contest the election, filed an amended petition on December 10, 1986, and filed a second amended petition on February 3, 1987. Gribble attached two affidavits to his second amended petition, one from two election judges asserting that an absentee ballot from Alvina Foehner — a registered voter residing at the Hillview Manor Nursing Home in Central Precinct Number 5 — was mistakenly rejected because at the time of the election the judges believed that Foehner was dead, and the other from Foehner asserting that she was in fact alive at the time of the election and had voted for Gribble for sheriff. On February 11, 1987, Willeford filed a motion to dismiss the second amended petition, which the court denied, and on February 20, 1987, he filed his answer and affirmative defenses. After hearing extensive testimony and examining the evidence, the trial court, on June 8, 1988, entered a judgment in favor of Gribble and filed an “explanation” of this judgment on June 30, 1988. On July 7, 1988, Willeford filed a post-trial motion, and the trial court denied this motion on November 15, 1988. Willeford appeals. We affirm.
Willeford contends on this appeal that: (1) the trial court erred in denying his motion to dismiss Gribble’s second amended petition because the trial court did not have jurisdiction to hear that petition; (2) the trial court erred in considering the ballots of voters who were not challenged by poll watchers or election judges at the polls on election day; and (3) the trial court erred in utilizing the voters’ party affiliations in prior elections in determining which candidate should gain or lose a vote.
Willeford initially contends that the trial court erred when it denied his motion to dismiss Gribble’s second amended petition. In his motion to dismiss, Willeford attacked Gribble’s second amended petition — in particular that petition’s reliance on the alleged erroneous failure to count Alvina Foehner’s vote — by asserting, inter alia, that the election judges properly rejected, albeit for the wrong reasons, Foehner’s absentee ballot. In support of this assertion, Willeford attached to his motion Foehner’s discovery deposition which allegedly revealed that Foehner did not comply with the requisite statutory procedural formalities when she cast her absentee ballot.
Willeford’s reliance on Foehner’s discovery deposition in his motion to dismiss was misplaced. In his motion, Willeford failed to specify under which statutory section he sought to dismiss Gribble’s petition, although in his brief he asserts that the motion was brought under sections 2 — 619(a)(1) and 2 — 619(a)(9) of the Code of Civil Procedure (Ill. Rev. Stat. 1985, ch. 110, pars. 2 — 619(a)(1), (a)(9)). A section 2 — 619(a)(1) motion to dismiss alleges that the court does not have jurisdiction over the subject matter of the action. (Ill. Rev. Stat. 1985, ch. 110, par. 2 — 619(a)(1).) Certainly the trial court in the instant case would have subject-matter jurisdiction so long as Gribble’s petition met the requisite statutory requirements. Section 2 — 619(a)(9) provides that the “[defendant may, within the time for pleading, file a motion for dismissal of the action or for other appropriate relief upon any of the following grounds. *** That the claim asserted against defendant is barred by other affirmative matter avoiding the legal effect of or defeating the claim.” (Ill. Rev. Stat. 1985, ch. 110, par. 2 — 619(a)(9).) Other affirmative matter in the context of a section 2 — 619(a)(9) motion for dismissal “is something in the nature of a defense that negates an alleged cause of action completely or refutes crucial conclusions of law or conclusions of material fact unsupported by allegations of specific fact contained in or inferred from the complaint.” (Longust v. Peabody Coal Co. (1986), 151 Ill. App. 3d 754, 757, 502 N.E.2d 1096, 1098.) Well-pleaded facts are taken as true for purposes of a motion to dismiss under section 2 — 619(a)(9). Longust, 151 Ill. App. 3d at 757, 502 N.E.2d at 1098.
In this instance, as in Longust, the party moving to dismiss the complaint failed to assert affirmative matter which avoided the legal effect of or defeated the claim in the plaintiff’s petition. Willeford attempted to attack the basis of Gribble’s petition by asserting, essentially, that even if the election judges erroneously rejected Foehner’s absentee ballot, her ballot should have been rejected anyway since Foehner did not comply with all of the requisite formalities of casting an absentee ballot. Willeford thus offered evidence which tended to negate an ultimate factual allegation contained in Gribble’s petition; i.e., that Foehner’s vote was “erroneously rejected.” Such an assertion, which implies that no genuine issue of material fact exists, is appropriate in a motion for summary judgment (see Ill. Rev. Stat. 1985, ch. 110, par. 2 — 1005(c)), but has no place in an involuntary motion to dismiss under section 2 — 619(a)(9) of the Code of Civil Procedure. See People ex rel. Skinner v. FGM, Inc. (1988), 166 Ill. App. 3d 802, 807, 520 N.E.2d 1024, 1028 (“a motion to dismiss should not be employed as a substitute for [a motion for] summary judgment”).
Willeford’s motion also alleged that Cribble’s petition failed to state a cause of action, which would indicate an intention to move to dismiss pursuant to section 2 — 615 of the Code of Civil Procedure. (Ill. Rev. Stat. 1985, ch. 110, par. 2 — 615.) In Cain v. American National Bank & Trust Co. (1975), 26 Ill. App. 3d 574, 585-86, 325 N.E.2d 799, 808, the court noted that all well-pleaded facts in a section 45 (the predecessor of section 2 — 615) motion are taken as true, and that the motion must attack the legal sufficiency of the complaint, not the factual sufficiency. As previously noted, Willeford’s motion to dismiss attacked several factual allegations in Cribble’s petition, which is clearly inappropriate in a section 2 — 615 motion to dismiss. However, we still must determine whether Cribble’s second amended petition complied with the legal requirements of a petition to contest an election. Repeated decisions have firmly established that the purpose of an election contest is to ascertain how many votes were cast for or against a candidate, or for or against a measure, and thereby ascertain and effectuate the will of the people. (Wagler v. Stoecker (1946), 393 Ill. 560, 562, 66 N.E.2d 408.) In Wood v. Hartman (1942), 381 Ill. 474, 480, 45 N.E.2d 864, 867, the Illinois Supreme Court noted that “[t]he right to contest the election of an individual to office is not a common law right, but exists only by statute.” Section 23 — 20 of the Code (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 20) prescribes the rules which govern a petition to contest an election to an office other than those statewide offices listed in section 23 — 19 of the Code (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 19). Section 23 — 20 specifies that the petition to contest an election “shall allege that the petitioner voted at the election, and that he believes that a mistake or fraud has been committed in specified precincts in the counting or return of the votes for the office or proposition involved or that there was some other specified irregularity in the conduct of the election in such precincts.” Ill. Rev. Stat. 1985, ch. 46, par. 23 — 20.
In addition to those requirements, the petition must make further allegations. Prior to the enactment of section 23 — 23.2 of the Code (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 23.2), effective January 1, 1986, a petition to contest an election was required to show a positive and clear assertion, allegation or claim that such a recount would change the results of the election. {In re Contest of the Election for the Offices of Governor & Lieutenant Governor Held at the General Election on November 2, 1982 (1983), 93 Ill. 2d 463, 478-79, 444 N.E.2d 170, 177 (hereinafter In re Contest).) In re Contest involved a challenge to the results of the November 2, 1982, election for Governor and Lieutenant Governor for the State of Illinois. Adlai Stevenson, plaintiff, challenged the canvass of the election and filed a petition with the clerk of the Illinois Supreme Court to contest the election pursuant to section 23 — 1.1 of the Code. (Ill. Rev. Stat. 1981, ch. 46, par. 23 — 1.1.) James Thompson and George Ryan, defendants, filed a motion to strike the petition, which the supreme court granted. The supreme court held that the allegations in Stevenson’s petition lacked a positive and clear assertion that the election contest would change the result of the election, failed to contain allegations of fact sufficient to support such a change, and were thus legally insufficient to support the election contest. In re Contest, 93 Ill. 2d at 491, 444 N.E.2d at 183.
The supreme court relied on its prior decision in Zahray v. Emricson (1962), 25 Ill. 2d 121, 182 N.E.2d 756, as authority for its holding in In re Contest. The Zahray court reasoned that in the absence of an allegation that the results of the election were changed by the alleged irregularities, or facts showing such a result, the petition assumes the proportions of an exploratory process to which neither the courts nor election officials should be subjected. (Zahray, 25 Ill. 2d at 125, 182 N.E.2d at 758.) The Zahray court warned that the election contest
“cannot be employed to allow a party, on mere suspicion, to have the ballots opened and subjected to scrutiny to find evidence upon which to make a tangible charge. [Citations.] And while the pleadings in contest proceedings are not required to comply with the strict technical rules applicable in civil actions, there should be such strictness as will prevent the setting aside of the acts of sworn officials without adequate and well defined cause. [Citations.] Stated otherwise, there should be no reason for a recount of the votes unless there is a positive and clear assertion, allegation or claim that such a recount will change the result of the election.” Zahray, 25 Ill. 2d at 124, 182 N.E.2d at 758.
Subsequent to In re Contest, decided by the supreme court in January of 1983, the legislature enacted section 23 — 23.2 of the Code, effective January 1, 1986. (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 23.2.) Section 23 — 23.2 of the Code now provides that “[a] court hearing an election contest pursuant to this Article or any other provision of the law shall grant a petition for a recount properly filed where, based on the facts alleged in such petition, there appears a reasonable likelihood, the recount will change the results of the election.” (Emphasis added.) (Ill. Rev. Stat. 1985, ch. 46, par. 23 — 23.2.) Since section 23 — 23.2 became effective prior to this election contest, the legislature’s prescription in section 23 — 23.2 of the Code — “a reasonable likelihood the recount will change the results of the election” — is the standard against which we must compare Cribble's petition to determine whether that petition was legally sufficient to contest the Bond County election for sheriff.
We hold, for a number of reasons, that Cribble’s petition was sufficient to meet the requirements of section 23 — 23.2 of the Code. In an election which results in a tie, a change in a single vote will determine the winner of the election. In the instant case, Cribble’s second amended petition alleged that the ballot from Alvina Foehner was “erroneously rejected,” a conclusion of material fact which is supported by Cribble’s allegations of specific fact that “[a] mistake was made by the election authority and the election judges of Central Precinct Number 5, Bond County, Illinois, in that said judges received an absentee ballot from Alvina Foehner which was erroneously rejected, not deposited in the box and returned to the County Clerk as rejected and not counted because the election judges thought that Alvina Foehner was deceased when in fact she was alive.” Gribble also contended in his petition that three voters — Velma Ledbetter, Luther Ledbetter, and Lee Roy McCray, all three of whom cast ballots for Willeford’s party in earlier primary contests — had voted illegally in the November 4, 1986, election. As subsequently noted in this opinion, these three ballots, if indeed cast illegally, must be deducted from Willeford’s vote total. These allegations, taken as true for purposes of determining the legal sufficiency of the petition, would have given Gribble one additional vote and would have deducted three votes from Willeford’s total, and this was enough for Gribble to win the election. Since Gribble made positive assertions that a recount which included Foehner’s vote and excluded the illegal votes cast for Willeford would change the result of the election, and this likelihood was reasonable since the canvass of the election resulted in a tie, the allegations in the petition were legally sufficient under section 23 — 23.2 of the Code. Ill. Rev. Stat. 1985, ch. 46, par. 23 — 23.2.
Willeford’s next contention before this court is that the lower court erred in considering the ballots of voters who were not challenged by poll watchers or election judges at the polls on election day.
Section 17 — 23(2) of the Code provides that each candidate is entitled to appoint two poll watchers per precinct. (Ill. Rev. Stat. 1985, ch. 46, par. 17 — 23(2).) These poll watchers are permitted to observe all proceedings relating to the conduct of the election and may challenge for cause the voting qualifications of a person offering to vote and may call to the attention of the judges of election any incorrect procedure or apparent violations of the Code. Ill. Rev. Stat. 1985, ch. 46, par. 17-23.
Our recent decision in Jordan v. Officer (1988), 170 Ill. App. 3d 776, 783, 525 N.E.2d 1067, is dispositive on the issue of whether the party challenging the eligibility of voters waives the challenge if he fails to utilize the procedures provided by statute. In rejecting this contention, the Jordan court stated that
“[defendants have not persuaded us that waiver is applicable in this context. They cite no cases that so hold.
The Tuthill case [Tuthill v. Rendleman (1944), 387 Ill. 321, 56 N.E.2d 375], cited by plaintiffs, holds to the contrary. In Tuthill, the supreme court stated that voting without challenge raises a presumption of a legally cast ballot. That presumption can be overcome by competent evidence. The court in Tuthill applied the presumption in determining that a voter (Benjamin Morris) and his wife were eligible to vote in the election at issue. The court stated, ‘The proof did not overcome the presumption of the validity of their votes cast unchallenged.’ (Tuthill, 387 Ill. at 340, 56 N.E.2d at 385.) Obviously, the supreme court in Tuthill did not consider waiver an impediment to consideration of an unchallenged voter’s eligibility in an election contest.” Jordan, 170 Ill. App. 3d at 783, 525 N.E.2d at 1071.
We are unable to distinguish the factual situation in the instant case in any meaningful way from that which led to our holding in Jordan, and we decline Willeford’s attorney’s invitation in oral argument to reconsider the rule as announced in that case. We hence conclude that Gribble did not waive his right to challenge the eligibility of voters by not utilizing the procedures provided by statute.
Willeford finally contends that the trial court erred by examining the voters’ party affiliations in prior elections in determining which candidate should gain or lose illegally cast votes. Following this court’s holding in Leach v. Johnson (1974), 20 Ill. App. 3d 713, 313 N.E.2d 636, the trial court reapportioned those votes according to evidence of the voter’s party affiliation.
In Leach, this court examined various alternatives for determining from which candidate to deduct illegally cast votes. The Leach court considered the argument that the rule, previously established in many Illinois cases, that illegal votes must be deducted based upon party affiliation is outmoded due to changes in voter attitudes and the willingness of voters to cross over and vote split tickets. The court noted that while it may be demonstrated that there is less allegiance to party lines and more cross-over voting than in the past, in the absence of better evidence, party affiliation is still the best method for dividing the votes to be eliminated. Leach, 20 Ill. App. 3d at 719-20, 313 N.E.2d at 642.
The Leach court observed that “[a]sking illegal voters to disclose how they voted is hardly the answer — even if it could be done — since many of those who vote illegally would have no compunction about testifying that they voted for the opposite party.” (Leach, 20 Ill. App. 3d at 720, 313 N.E.2d at 642.) Subsequent to the decision in Leach, the legislature enacted section 8 — 910 of the Code of Civil Procedure, effective January 1, 1986, which provides that no person shall be compelled to disclose, in any proceeding conducted by a court, the name of any candidate for whose nomination, election or retention in office the person voted. (Ill. Rev. Stat. 1985, ch. 110, par. 8 — 910.) Thus, compelling illegal voters to disclose how they voted is no longer possible under the law. The other alternative to eliminating the illegally cast votes, throwing out all the votes in a voting precinct, should be avoided if at all possible since it disfranchises legal voters and is thus not fair either to the legal voters or to the candidates themselves. Leach, 20 Ill. App. 3d at 720, 313 N.E.2d at 642.
“In election contests *** the ballots are before the court to be counted, and the sole question to arise and to be considered is as to whether or not the ballots are legal or illegal.” (Wood v. Hartman (1942), 381 Ill. 474, 481, 45 N.E.2d 864, 867.) The trial court deducted the votes of several voters who cast ballots in the wrong precinct from the candidates in the manner as directed by the holding of Leach. We decline Willeford’s counsel’s invitation to reverse the holding of Leach, and we hold that Leach, which is squarely on point, is dispositive to the final issue on this appeal.
For the foregoing reasons, we affirm the judgment of the circuit court of Bond County.
Affirmed.
LEWIS, J., concurs.