
922 A.2d 36 (2007)
Mark BANFIELD, Sarah Beck, Joan Bergquist, Alan Brau, Lucia Dailey, Peter Deutsch, Constance Fewlass, Barbara Glassman, Marijo Highland, Janis Hobbs-Pellechio, Deborah Johnson, Robert Maxwell McCord, Andrew McDowell, James Michaels, J. Whyatt Mondesire, Mary Montresor, Rev. James Moore, Cathy Reed, Regina Schlitz, Alexander Sickert, Daniel Sleator, Susanna Staas, Stephen J. Strahs, Mary Vollero, Jeanne Zang, Petitioners
v.
Pedro CORTES, Secretary of the Commonwealth, Respondent.
Commonwealth Court of Pennsylvania.
Argued November 15, 2006.
Decided April 12, 2007.
*40 Mary E. Kohart and Michael Churchill, Philadelphia and Marian K. Schneider, Berwyn, for petitioners.
Mark A. Aronchick, Alan C. Promer, John S. Stapleton, and Sozi P. Tulante, Philadelphia, for respondent.
BEFORE: SMITH-RIBNER, Judge, and PELLEGRINI, Judge, and FRIEDMAN, Judge, and LEADBETTER, Judge, and COHN JUBELIRER, Judge, and SIMPSON, Judge, and LEAVITT, Judge.
OPINION BY Judge FRIEDMAN.
Pedro Cortes, Secretary of the Commonwealth, (Secretary) has filed preliminary objections to the petition for review (Petition) filed in this court's original jurisdiction by Mark Banfield, Sarah Beck, Joan Bergquist, Alan Brau, Lucia Dailey, Peter Deutsch, Constance Fewlass, Barbara Glassman, Marijo Highland, Janis Hobbs-Pellechio, Deborah Johnson, Robert Maxwell McCord, Andrew McDowell, James Michaels, J. Whyatt Mondesire, Mary Montresor, Rev. James Moore, Cathy Reed, Regina Schlitz, Alexander Sickert, Daniel Sleator, Susanna Staas, Stephen J. Strahs, Mary Vollero and Jeanne Zang (collectively, Electors). In the Petition, Electors set forth the following allegations.
The Secretary has certified Direct Recording Electronic voting systems (DREs) for use in Pennsylvania.[1] (Petition, ¶ 40.) DREs are devices that display ballots and allow a voter to make choices with a push button, dial or touch screen and then cast the vote. DREs are supposed to record the vote on an electronic storage device in the form of digital markings. (Petition, ¶ 39.) The certified DREs produce no contemporaneous external paper record that would allow voters to verify that their votes were recorded accurately. (Petition, ¶ 41.) Because the systems are paperless, election officials have no independent physical record to use for auditing DRE vote counts. (Petition, ¶¶ 42-43.)
The various certified DREs have failed during elections conducted in Pennsylvania and other states by: (1) losing almost 13,000 votes; (2) repeatedly registering votes for one candidate when the voter was attempting to vote for another candidate; (3) causing very high "undervote" rates; (4) failing to register votes when the ballot contained only one question; (5) counting more than 1,500 votes twice; (6) failing to print "zero tapes" to demonstrate that no lawful votes were stored on the machine prior to the election; (7) printing "zero tapes" after votes had been cast, i.e., at a time when the machines should not have reported zero votes; (8) printing "zero tapes" that did not contain all necessary information; (9) reporting 100,000 "phantom" votes, i.e., votes that were not cast by any voter; (10) failing to record any votes in four precincts due to programming errors, forcing officials to certify election results without votes from those precincts; (11) failing to activate for use; or (12) failing to record write-in votes. In certifying the DREs, the Secretary did not confirm that malfunctions that occurred previously in other states had been fixed.[2] (Petition, ¶¶ 54, 58-59, 62, 64, 66-68.)
*41 In addition to these operational failures, in 2006, a computer security investigator found that anyone with brief access to the AccuVote TSX could corrupt the software in a way that would be difficult to detect and that would render the DRE vulnerable to tampering. Moreover, the AccuVote TSX operating systems have a history of security problems. A person with access to the AVC Edge II for a short time could modify unencrypted voting results or replace the "chip" with one that would re-program the machine to give all votes to a particular candidate. The eSlate voting machine transmits unencrypted data along a cable to a central terminal, allowing an unauthorized person to access, monitor and alter data transmitted over the cable. The iVotronic system uses a personal electronic ballot (PEB) to activate and de-activate individual machines, allowing any corruption, malfunction or contamination in one machine to be transmitted to other machines. (Petition, ¶¶ 72-79.)
The Secretary's certification of such DREs is the result of the Secretary's deficient examination criteria. The Secretary's testing procedures do not approximate those that are customary in the information technology industry for systems that require a high level of security. The Secretary does not perform a "code audit," i.e., a review of a computer program's source code to determine whether it meets applicable standards. DRE vendors do not disclose the software programs they use, making it impossible for the Secretary to verify that the programs used in an election are the programs actually certified by the Secretary. To the extent that the Secretary relies on certifications of Independent Testing Authorities (ITA), which test DREs for manufacturers, ITAs are fraught with conflicts of interest, and they have repeatedly approved systems later found to have security problems. Moreover, Pennsylvania certification requirements are more stringent than those in the ITA process. (Petition, ¶¶ 81-94.)
By letter dated March 7, 2006, Elector Alan Brau asked the Secretary to re-examine one of the certified DREs. Brau enclosed a check for $450 and the signatures of ten qualified registered electors, as required by statute. By letter dated March 27, 2006, the Secretary denied the request, stating that the Secretary was not aware of any change to the DRE. The Secretary received three similar re-examination requests from other Electors, but the Secretary denied each one for the same reason. (Petition, ¶¶ 95-102.)
On August 15, 2006, Electors filed their Petition, setting forth ten Counts that allege violations of the Pennsylvania Election Code[3] (Election Code) and the Pennsylvania Constitution. Essentially, Electors allege that the Secretary has used inadequate examination procedures in certifying DREs that: (1) are not reliable or consistent in the recording and counting of votes; (2) are not secure; (3) do not provide a means for voters to verify that the DRE properly recorded or counted their votes; and (4) do not provide a means for anyone to determine the actual votes cast in an election. Electors seek a judgment declaring that the Secretary has violated the Election Code and the Pennsylvania Constitution. Electors also seek an order directing the Secretary to de-certify *42 the DREs, to establish uniform testing criteria that comply with the Election Code and to re-examine the DREs identified in the requests of Brau and the other Electors. In response, the Secretary has filed the following sixteen preliminary objections. For the reasons set forth below, we overrule the Secretary's preliminary objections.

I. Mandamus
In the first preliminary objection, the Secretary argues that this court should dismiss Electors' Petition because Electors seek mandamus relief but state no claim for which mandamus relief can be granted. We disagree.
Mandamus is an extraordinary remedy designed to compel official performance of a ministerial act or mandatory duty where there exists a clear legal right in the plaintiff and a corresponding duty in the defendant and where there is no other adequate remedy at law. County of Allegheny v. Commonwealth, 518 Pa. 556, 544 A.2d 1305 (1988). Mandamus will not lie to compel the performance of discretionary acts except where the exercise or non-exercise of discretion is arbitrary, fraudulent, or based upon a mistaken view of the law. Camiel v. Thornburgh, 507 Pa. 337, 489 A.2d 1360 (1985). "If [an official] abuses his [or her] discretion or acts under a mistaken view of the law, mandamus will lie to compel proper action." Duncan Meter Corporation v. Gritsavage, 361 Pa. 607, 610, 65 A.2d 402, 403 (1949).
The Secretary first argues that Electors are not entitled to mandamus relief because decisions to certify DREs, to establish DRE testing criteria and to conduct re-examinations are discretionary. However, here, Electors have alleged facts sufficient to establish that the Secretary's decisions in this regard were arbitrary or based on a mistaken view of the law, i.e., either the Election Code or the Pennsylvania Constitution. Indeed, Electors allege that the Secretary decided to: (1) certify DREs that are not reliable or secure and that do not allow for vote verification or vote audits; (2) examine DREs without establishing uniform testing criteria that comply with the Election Code; and (3) refuse proper requests for statutorily-mandated DRE re-examinations. Thus, mandamus lies to compel proper action.
The Secretary next argues that Electors are not entitled to mandamus relief because Electors do not have a clear right to have the Secretary de-certify the DREs. However, because Electors have alleged sufficient facts to support their claim that the Secretary's DRE certifications were arbitrary or based on a mistaken view of the law, mandamus lies to compel proper action, i.e., de-certification of the DREs.
The Secretary also argues that Electors are not entitled to mandamus relief because Electors do not have a clear right to have the Secretary re-examine a DRE in a particular manner. (See Secretary's brief at 19.) However, Electors do not allege in their Petition that any Elector asked the Secretary to re-examine a DRE in a particular manner. Thus, we shall not consider this matter further.
Finally, the Secretary argues that Electors are not entitled to mandamus relief because Electors do not have a clear right to have the Secretary establish uniform testing criteria that comply with the Election Code. However, section 1105-A of the Election Code[4] states that, after each DRE examination, the Secretary shall file a report stating whether the DRE "can be safely used by voters at elections as provided in this act and meets all of the *43 requirements hereinafter set forth." 25 P.S. § 3031.5(b). It would be impossible for the Secretary to file such a report if the Secretary did not establish uniform testing criteria that comply with the Election Code. To the extent that the Secretary believes that section 1105-A allows the Secretary to examine DREs without regard to the requirements of the Election Code, the Secretary is mistaken.
Accordingly, we overrule the Secretary's first preliminary objection.

II. Sovereign Immunity
In the second preliminary objection, the Secretary argues that Commonwealth officials are immune from claims seeking affirmative or mandatory injunctive relief.[5] We disagree.
"Actions in mandamus are not subject to the defense of sovereign immunity." Maute v. Frank, 441 Pa.Super. 401, 657 A.2d 985, 986 (1995) (citing Madden v. Jeffes, 85 Pa.Cmwlth. 414, 482 A.2d 1162 (1984)). Indeed, this court has stated that the doctrine of sovereign immunity does not bar suits that seek to compel state officials to carry out their duties in a lawful manner. Milestone Materials, Inc. v. Department of Conservation and Natural Resources, 730 A.2d 1034 (Pa.Cmwlth. 1999); see also City of Philadelphia v. Shapp, 44 Pa.Cmwlth. 303, 403 A.2d 1043 (1979) (holding that sovereign immunity does not bar a mandamus action against the Governor and the Department of Transportation to compel their performance in accordance with constitutional and legislative mandates).
Accordingly, we overrule the Secretary's second preliminary objection.

III. Indispensable Parties
In the third preliminary objection, the Secretary argues that this court should dismiss Counts I to V and VIII to X of the Petition for failure to join indispensable parties, i.e., the fifty-six counties planning to use one or more of the challenged DREs in the November 2006 election. We disagree.
A party is indispensable when his or her rights are so connected with the claims of the litigants that no decree can be made without impairing those rights. Sprague v. Casey, 520 Pa. 38, 550 A.2d 184 (1988). "A corollary of this principle is that a party against whom no redress is sought need not be joined. In this connection, if the merits of a case can be determined without prejudice to the rights of the absent party, the court may proceed." Id. at 48-49, 550 A.2d at 189 (citations omitted).
Section 7540(a) of the Declaratory Judgments Act states that, when declaratory relief is sought, all persons shall be made parties who have any interest which would be affected by the declaration, and no declaration shall prejudice the rights of persons not parties to the proceeding. 42 Pa.C.S. § 7540(a). While the provision is mandatory, it is subject to limiting principles. *44 City of Philadelphia v. Commonwealth, 575 Pa. 542, 838 A.2d 566 (2003).
Here, Electors do not seek redress from the fifty-six counties, and, because the November 2006 election has passed, the fifty-six counties will not be prejudiced by a judgment in favor of Electors. Even absent a request, the Secretary could de-certify a DRE at any time based solely on the statutory requirements for certification, and counties using certified DREs must be prepared for that possibility.
Accordingly, we overrule the Secretary's third preliminary objection.

IV. Separation of Powers
In the fourth preliminary objection, the Secretary argues that Electors ask this court to violate the separation of powers doctrine by usurping the power of the executive branch of government to de-certify electronic voting systems, re-examine electronic voting systems and establish testing criteria. We disagree.
The judicial branch does not usurp the power of the executive branch by interpreting and applying a legislative enactment and directing that the Secretary comply with it. See Commonwealth v. Sutley, 474 Pa. 256, 378 A.2d 780 (1977) (stating that, in Pennsylvania's tripartite government of equal, separate and autonomous branches, each branch acts as a check on the other, and the domain of the judiciary is to interpret, construe and apply the law).
Accordingly, we overrule the Secretary's fourth preliminary objection.[6]

V. Standing and Ripeness
In the fifth preliminary objection, the Secretary argues that, due to lack of standing and lack of ripeness, this court should dismiss Counts I to V and VII to X of the Petition with respect to all Electors and should dismiss Count VI with respect to all Electors except the four who filed requests for re-examination under section 1105-A of the Election Code. We disagree.
To establish standing, Electors must allege a substantial, direct and immediate interest in the outcome of the litigation. Wm. Penn Parking Garage, Inc. v. City of Pittsburgh, 464 Pa. 168, 346 A.2d 269 (1975). An interest is substantial if it surpasses the common interest of all citizens in obedience to the law; an interest is direct if it is harmed by the matter that is the subject of the complaint; and an interest is immediate if it is not remote or speculative. Id.
Electors have alleged a substantial interest in the certification of the challenged DREs by asserting that, unlike all citizens, they are required to vote using DREs that are not reliable or secure and that do not provide a means for vote verification or vote audit. (Petition, ¶¶ 3-6, 36.) Electors have alleged a direct interest by asserting that, because of such deficiencies, Electors have "no way of knowing" whether the DREs will recognize their votes in an election. (Petition, ¶¶ 1, 41.) Finally, Electors have alleged an immediate interest by asserting that "each wants to cast a ballot" in future elections, and "each wants their future votes . . . to be properly counted and weighted."[7] (Petition, ¶ 37.) Thus, Electors have standing.
*45 In determining whether the doctrine of ripeness bars a declaratory judgment action, we consider: (1) whether the issues are adequately developed for judicial review, including whether the claim involves uncertain and contingent events that may not occur as anticipated or at all; and (2) what hardship the parties will suffer if review is delayed. Alaica v. Ridge, 784 A.2d 837 (Pa.Cmwlth.2001).
With respect to the first prong, Electors' claim does not involve uncertain and contingent events. The Secretary already has certified DREs that provide no way for Electors to know whether their votes will be recognized. With respect to the second prong, if this court waits to review the Secretary's certification of the DREs until Electors challenge the results of an election, Electors will suffer hardship because it will be impossible to determine the validity of the challenge by auditing the election results.
Accordingly, we overrule the Secretary's fifth preliminary objection.

VI. Exhaustion of Available Remedies
In the sixth preliminary objection, the Secretary argues that Electors failed to seek re-examination of the eSlate, AVC Advantage and AVC Edge II voting systems under section 1105-A of the Election Code; therefore, this court should dismiss the Petition to the extent it seeks relief relating to those systems. We disagree.
The exhaustion of administrative remedies rule is neither inflexible nor absolute; a court may exercise jurisdiction where an administrative remedy is inadequate. Feingold v. Bell of Pennsylvania, 477 Pa. 1, 383 A.2d 791 (1977). Here, four of the Electors filed proper requests for the re-examination of DREs other than the eSlate, AVC Advantage and AVC Edge II, but the Secretary denied those requests despite the fact that the Secretary had a statutory duty to conduct the re-examinations. Because Electors found that administrative remedy inadequate on four separate occasions, Electors were not required to continue seeking such relief before filing the Petition.
Accordingly, we overrule the Secretary's sixth preliminary objection.

VII. Laches
In the seventh preliminary objection, the Secretary argues that the Petition is barred by the doctrine of laches because: (1) Electors waited thirteen weeks after the May 2006 primary election to file their Petition, and they allege no facts to justify that delay; and (2) the Secretary is prejudiced by the filing of the Petition less than seven weeks prior to the General Election.
Laches is an equitable defense that bars relief when the plaintiff's dereliction indicates a lack of due diligence in failing to institute an action, and such failure results in prejudice to another. Commonwealth ex rel. Baldwin v. Richard, 561 Pa. 489, 751 A.2d 647 (2000). However, the defense of laches is an affirmative defense that is not properly raised in preliminary objections but must be raised in a *46 responsive pleading as new matter.[8]Pennsylvania Pharmacists Association v. Department of Public Welfare, 733 A.2d 666 (Pa.Cmwlth.1999).
Accordingly, we overrule the Secretary's seventh preliminary objection.

VIII. Failure to Appeal
In the eighth preliminary objection, the Secretary argues that Count VI should be dismissed because the four Electors who requested re-examination under section 1105-A of the Election Code failed to petition for review of the Secretary's denials within thirty days. We disagree.
The Secretary contends that Electors had the right of appeal under Article V, Section 9 of the Pennsylvania Constitution, which provides for the right of appeal from an administrative agency to a court, "the selection of such court to be as provided by law." Pa. Const., art. V, § 9. However, Article V, Section 9 is not self-executing, i.e., the provision does not confer the right of appeal where there has been no statutory implementation. LaCamera v. Board of Probation and Parole, 13 Pa.Cmwlth. 85, 317 A.2d 925 (1974); Manheim Township School District v. State Board of Education, 1 Pa.Cmwlth. 627, 276 A.2d 561 (1971).
Although Section 1105-A of the Election Code allows any person to request the re-examination of a DRE, the provision does not provide the right of appeal from the denial of the request. Indeed, the Secretary's letters denying the requests for re-examination in this case do not mention the right of appeal. We also note that section 702 of the Administrative Agency Law, 2 Pa.C.S. § 702, provides the right of appeal to any person aggrieved by an adjudication of a Commonwealth agency. However, section 702 does not apply to adjudications by the Secretary. See 2 Pa. C.S. §§ 501(b)(2), 701(b)(1). Thus, Electors had no right of appeal under Article V, Section 9 of the Pennsylvania Constitution.
Accordingly, we overrule the Secretary's eighth preliminary objection.

IX. Legal Sufficiency of Count I
In the ninth preliminary objection, the Secretary argues that Count I should be dismissed as legally insufficient. We disagree.
In Count I, Electors allege that the Secretary has violated section 1101-A of the Election Code[9] by certifying DREs that do not create a "permanent physical record which can be retained." (Petition, ¶ 113.) "Retention of a permanent physical record that the voter can verify is necessary for a meaningful, independent audit or recount of the voting results electronically recorded, stored, tallied and reported by the certified DREs and to assure compliance with the other provisions of the Pennsylvania Election Code." (Petition, ¶ 113.) Electors seek a judgment declaring that the challenged DREs violate section 1101-A because they do not create a "voter verified independent record that *47 can be used to audit voting results." (Petition, Count I "Wherefore" clause at b.)
First, the Secretary contends that section 1101-A does not require a "voter verified independent record" of each vote cast; the provision only requires a "permanent physical record" of each vote cast. (Secretary's brief at 25.) However, section 1117-A of the Election Code requires that the county board of elections conduct "a statistical recount of a random sample of ballots after each election using manual, mechanical or electronic devices of a type different than those used for the specific election." 25 P.S. § 3031.17 (emphasis added). The Secretary does not explain, and, at this stage of the proceedings, there is no evidence to explain how a board is to conduct a statistical recount using a different type of device if the permanent physical record of each vote cast on a DRE is not independent of the data in the electronic storage system.
Second, the Secretary contends that the Ballot Image Retention (BIR) feature of some DREs, which is mentioned in the Petition, satisfies the "permanent physical record" requirement because the BIRs are capable of being printed. However, if the BIR feature is only on some DREs, and those DREs are not identified in the Petition, we cannot dismiss Count I on that basis. Moreover, Electors allege that a BIR is not necessarily a "permanent physical record" of the vote cast because the BIR does not allow the voter to verify the vote and because it is simply the data recorded by the software, correctly or incorrectly. (Petition, ¶ 49.) Because a BIR may not be a "permanent physical record" of the vote cast, we cannot dismiss Count I based on the BIR feature.
Accordingly, we overrule the Secretary's ninth preliminary objection.

X. Legal SufficiencyCounts I, II, IV and V
In the tenth preliminary objection, the Secretary argues that this court should dismiss Counts I, II, IV and V of the Petition as legally insufficient based on the separation of powers doctrine and Article VII, Section 4 of the Pennsylvania Constitution[10] because these Counts presume that section 1101-A of the Election Code requires a voter verified independent record.
The Secretary asserts that: (1) these Counts violate the separation of powers doctrine because they force this court to make a policy choice in favor of a "voter verified independent record," a policy choice that is properly brought before the legislature;[11] and (2) a "voter verified independent record" would jeopardize the right to secrecy in voting provided by Article VII, Section 4 of the Pennsylvania Constitution.[12] However, as indicated above, Electors' well-pled allegations raise questions of fact as to whether it is possible to comply with section 1117-A of the Election Code absent a voter verified independent record.
*48 Accordingly, we overrule the Secretary's tenth preliminary objection.

XI. Legal Sufficiency of Count VIII
In the eleventh preliminary objection, the Secretary argues that this court should dismiss Count VIII of the Petition for failure to plead a constitutional injury under Article I, Section 5 of the Pennsylvania Constitution, which provides that elections shall be free and equal. Pa. Const., art. I, § 5.
Our supreme court has stated that elections are free and equal under Article I, Section 5:
when they are public and open to all qualified electors alike; when every voter has the same right as any other voter; when each voter under the law has the right to cast his ballot and have it honestly counted; when the regulation of the right to exercise the franchise does not deny the franchise itself, . . . and when no constitutional right of the qualified elector is subverted or denied him.
In re 1991 Pennsylvania Legislative Reapportionment Commission, 530 Pa. 335, 356, 609 A.2d 132, 142 (1992) (emphasis added) (quoting City Council v. Marcincin, 512 Pa. 1, 8, 515 A.2d 1320, 1323 (1986)).
In Count VIII, Electors allege that the Secretary's certification of the challenged DREs will make it "likely that a significant number of votes will not be counted accurately, or at all." (Petition, ¶ 133.) Electors also incorporate the allegation that they have "no way of knowing" whether a DRE has recognized their votes so that they will be counted. (Petition, ¶ 41.) Because Electors have a right under Article I, Section 5 of the Pennsylvania Constitution to have their votes honestly counted and because Electors have no way of knowing whether their votes will be honestly counted by DREs that are not reliable or secure and that provide no means for vote verification or vote audit, Electors have pled an injury under Article I, Section 5.
Accordingly, we overrule the Secretary's eleventh preliminary objection.

XII. Legal Sufficiency of Count IXEqual Protection
In the twelfth preliminary objection, the Secretary argues that this court should dismiss Count IX of the Petition for failure to allege an equal protection violation under Article I, Section 26 of the Pennsylvania Constitution, which states that the Commonwealth shall not discriminate against any person in the exercise of any civil right. Pa. Const., art. I, § 26.
In Count IX, Electors allege that their equal protection rights are at risk because, "while they are compelled to vote in counties using the certified DRE voting systems, other registered voters in Pennsylvania may vote in precincts or counties using voting systems . . . that do not suffer from the [identified] defects" of the DREs. (Petition, ¶ 139.) The Secretary argues that Electors fail to allege an equal protection violation because Article VII, Section 6 of the Pennsylvania Constitution permits the use of voting machines in some parts of the state without requiring the use of voting machines in other parts of the state. See Pa. Const., art. VII, § 6. However, Article VII, Section 6 does not permit DREs that are not reliable or secure and that provide no means for vote verification or vote audit.[13]
*49 Accordingly, we overrule the Secretary's twelfth preliminary objection.

XIII. Legal Sufficiency of Count IXDenial of a Right
In the thirteenth preliminary objection, the Secretary argues that this court should dismiss Count IX of the Petition for failure to allege the denial of a right under Article I, Section 26 of the Pennsylvania Constitution, which states that the Commonwealth shall not deny to any person the enjoyment of any civil right. Pa. Const., art. I, § 26.
In Count IX, Electors allege that the Secretary's certification of the challenged DREs threatens their right to vote because the defects and security flaws create the risk that Electors' votes will be rendered meaningless or, worse yet, deemed cast for a candidate for whom they did not vote. (Petition, ¶ 138.) Electors also incorporate the allegation that they have "no way of knowing" whether a DRE has recognized their votes so that they will be counted. (Petition, ¶ 41.) Because Electors have a right to vote and because Electors have no way of knowing whether using the DREs affords them that right, Electors have pled the denial of a civil right under Article I, Section 26.
Accordingly, we overrule the Secretary's thirteenth preliminary objection.

XIV. Legal Sufficiency of Count X
In the fourteenth preliminary objection, the Secretary argues that this court should dismiss Count X of the Petition for failure to state a claim under Article VII, Section 6 of the Pennsylvania Constitution, which states that all laws regulating the holding of elections shall be uniform throughout the state. Pa. Const., art. VII, § 6.
In Count X, Electors allege that the Secretary's DRE certifications have deprived Electors of their uniformity rights because the certifications allow some counties to use DREs that lack effective mechanisms for election audits, while other counties use voting systems that have effective mechanisms for election audits. (Petition, ¶¶ 142-43.) The Secretary points out that Article VII, Section 6 of the Pennsylvania Constitution permits the use of voting machines in some parts of the state without requiring the use of voting machines in other parts of the state. See Pa. Const., art. VII, § 6. However, as indicated above, Article VII, Section 6 does not permit the use of DREs that are not reliable or secure and provide no means for vote verification or vote audit.
Accordingly, we overrule the Secretary's fourteenth preliminary objection.

XV. Relief Pendente Lite

In the fifteenth preliminary objection, the Secretary argues that Electors are not entitled to relief pendente lite. However, in the Secretary's brief, the Secretary concedes that Electors no longer seek such relief. (Secretary's brief at 49 n. 31.) Accordingly, we overrule the Secretary's fifteenth preliminary objection.

XVI. Count VII
In the sixteenth preliminary objection, the Secretary asks this court either to dismiss Count VII of the Petition as duplicative of Count III or direct Electors to re-plead Count VII with greater specificity.
*50 In Count VII, Electors allege that the Secretary "has failed to adopt uniform, rigorous testing procedures that would adequately address the security, reliability and accuracy of voting systems." (Petition, ¶ 130) (emphasis added). In Count III, Electors allege that the Secretary's testing procedures were insufficient to determine whether the DREs met certain requirements set forth in section 1107-A of the Election Code.[14] In both Counts, Electors seek an order directing the Secretary to establish uniform testing criteria in accordance with the Election Code. (Petition at 27-28, 31.)
We conclude that Count VII is not entirely duplicative of Count III. If Electors were to prevail under Count VII, this court would direct the Secretary to establish uniform testing criteria that would be adequate to address all of the requirements of the Election Code. If Electors were to prevail under Count III, this court would direct the Secretary only to establish uniform testing criteria that would be adequate to address the requirements of the specified subsections of section 1107-A.
We also conclude that Count VII is sufficiently specific. A pleading is sufficiently specific if it provides enough facts to enable the defendant to frame a proper answer and prepare a defense. Commonwealth ex rel. Milk Marketing Board v. Sunnybrook Dairies, Inc., 29 Pa.Cmwlth. 210, 370 A.2d 765 (1977). Here, Electors allege that the Secretary failed to adopt adequate DRE testing procedures. The Secretary knows his own testing procedures. Thus, to prepare a defense to Count VII, the Secretary need only establish that the testing procedures in use enable the Secretary to determine whether DREs meet all of the requirements of the Election Code. See 25 P.S. § 3031.5(b).
Accordingly, we overrule the Secretary's sixteenth preliminary objection.

ORDER
AND NOW, this 12th day of April, 2007, the preliminary objections filed by Pedro Cortes, Secretary of the Commonwealth, are hereby overruled.
DISSENTING OPINION BY Judge LEAVITT.
Respectfully, I dissent from the majority's conclusion that the Petitioners have stated a cause of action in mandamus to compel the Secretary of the Commonwealth to decertify seven different Direct Recording Electronic (DRE) voting systems. Likewise, I do not believe that this Court can, by writ of mandamus, compel the Secretary to adopt "rational and appropriate" standards to guide his approval of DRE voting systems. The Secretary's decision to approve, or to disapprove, electronic voting systems requires the exercise of discretion and, as such, cannot be compelled by a writ of mandamus.
DRE voting systems are governed by standards in the Pennsylvania Election Code.[1] Section 1107 of the Election Code, *51 added by section 4 of the Act of July 11, 1980, P.L. 600, 25 P.S. § 3031.7. An electronic voting system must, inter alia, provide for "voting in secret;" permit a "vote for a straight political party by one mark or act;" offer the voter "a ticket selected from the nominees of any and all political parties;" and preclude a voter "from voting . . . more than once for the same candidate." Section 1107-A (l), (3), (4) and (8), 25 P.S. § 3031.7(1), (3), (4) and (8). These standards are straightforward, but this is not the case with all of the statutory standards. For example, the Election Code provides that the Secretary must find that an electronic voting system:
(11) Is suitably designed for the purpose used, is constructed in a neat and workmanlike manner of durable material of good quality, is safely and efficiently useable in the conduct of elections and, with respect to the counting of ballots cast at each district, is suitably designed and equipped to be capable of absolute accuracy, which accuracy shall be demonstrated to the Secretary of the Commonwealth.
(12) Provides acceptable ballot security procedures and impoundment of ballots to prevent tampering with or substitution of any ballots or ballot cards.
(13) When properly operated, records correctly and computes and tabulates accurately every valid vote registered.
(14) Is safely transportable.
(15) Is so constructed that a voter may readily learn the method of operating it.
Section 1107-A of the Election Code, 25 P.S. § 3031.7(11), (12), (13), (14) and (15) (emphasis added). In sum, before the Secretary can approve any electronic voting system for use in Pennsylvania that system must satisfy no less than seventeen different requirements, ranging from the simple to the complex.[2]
Petitioners assert that the Secretary's approvals of the seven DRE voting systems at issue were "sloppy, inadequate and illegal" because he did not properly test the systems. Petitioners' Brief at 2. Specifically, they claim the Secretary's testing methods were "ad hoc," "idiosyncratic" and conducted on "machines . . . cherry picked . . . by the manufacturer [and] tested . . . depending on the whim of the tester." Petitioners' Brief at 9. They accuse the Secretary of knowing that the seven DRE voting systems he approved "cannot be relied upon to record votes accurately, change votes from one candidate to another and can be tampered with using devices as commonplace as the key to a hotel mini-bar." Petitioners' Brief at 2.
These are serious allegations that we are required to accept as true. However, no matter how strongly worded or fevered the allegations in a complaint, the task for this Court remains the same: whether and how this Court can intervene.
This Court is bound by the statutory standards established for electronic voting systems. It is not for the courts, under any legal theory,[3] to amend the General Assembly's lengthy, detailed list of standards by adding new ones. Petitioners contend that the DRE voting systems are defective because they do not produce a *52 physical paper receipt of the ballot cast so that each voter can check to see if the machine properly tallied her vote. This requirement is not anywhere stated in the list of seventeen standards set forth in Section 1107-A of the Election Code. Indeed, the Secretary does not have the authority to disapprove an electronic voting system for the reason that the system does not provide a "voter verified independent record." A fortiori, this Court cannot order a voting system decertified on this account. Petition, ¶¶ 45, 49.
However, Petitioners direct us to the definitional section of the statute that describes an electronic voting system as one that "provide[s] for a permanent physical record of each vote cast." 25 P.S. § 3031.1. First, it is a stretch to reach into the definitional section of a statute to find a substantive requirement. How can the Secretary violate a definition? Second, the statute does not say "paper;" it says "physical record." What the legislature meant by "physical record" is less than clear; it likely means a recording sufficient to permit a recount. In any case, an action in mandamus is not the proceeding in which to establish legal rights but, rather, to vindicate those already clearly established. In re Bedow, 848 A.2d 1034, 1037 (Pa.Cmwlth.2004).
Petitioners are quite critical of how the Secretary has done his job, but they fail to correlate these criticisms to the actual language of the Election Code. Absent authority in the Election Code, we may not order the Secretary to adopt "rational" standards by which to do his job. If the standards in Section 1107-A are inadequate, it is for the legislature, not this Court, to conduct hearings into how existing statutory standards might be improved.
This brings us to the question of how the Secretary is to decide whether electronic voting systems satisfy the demands of the Election Code. Again, the legislature has given clear directions.
Essentially, the Secretary's job is to examine an electronic voting system and produce his own report "stating whether, in his opinion . . . the system can be safely used by voters. . . ." Section 1105-A(b) of the Election Code, added by section 4 of the Act of July 11, 1980, P.L. 600, as amended, 25 P.S. § 3031.5(b). Section 1105-A(b) provides in relevant part, as follows:
(b) Upon receipt of a request for examination or reexamination of an electronic voting system . . ., the Secretary of the Commonwealth shall examine the electronic voting system and shall make and file in his office his report, attested by his signature and the seal of his office, stating whether, in his opinion, the system so examined can be safely used by voters at elections as provided in this act and meets all of the requirements hereinafter set forth.
25 P.S. § 3031.5(b). Notably, the statute neither proscribes nor prescribes the participation of the manufacturer in the Secretary's examination of an electronic voting system. Petitioners assail the Secretary's "ad hoc" testing, but because each electronic voting system will be different, each examination will be conducted differently, or as Petitioners call it, "idiosyncratically."
It is the Secretary who has been given the responsibility and the discretion to evaluate electronic voting systems and determine whether they can be safely used. For the Secretary to determine that a system is "suitably designed," constructed of "good quality," offers "acceptable" security, is "safely transportable" and its use "readily" learned by the voter quite obviously *53 requires the exercise of discretion and judgment. Because the application of the standards in the Election Code and the manner of examination require the exercise of the Secretary's discretion, a writ of mandamus cannot issue.
A writ of mandamus will lie only where there is a clear right in the plaintiff to compel a public official's performance of a mandatory act that is ministerial in nature. Pennsylvania Dental Association v. Pennsylvania Insurance Department, 512 Pa. 217, 227, 516 A.2d 647, 652 (1986). Mandamus does not perform the function of an appeal, i.e., it does not "review or compel the undoing of an action by . . . an official." Id. Most importantly, it does not compel the exercise of discretion in a particular way. Id.
The majority, however, asserts that the law of mandamus provides an exception for discretionary acts that have been tainted by the public official's "mistaken" view of the law or "arbitrary" decisionmaking. Majority Opinion at 42. The precedent cited by the majority does not support the use of mandamus in this case.[4] As explained in Chadwick v. Dauphin County Coroner, 905 A.2d 600, 603 (Pa.Cmwlth. 2006), the statement that mandamus will lie where discretion is arbitrarily or mistakenly exercised has its origin in cases where a public official has refused to exercise discretion at all. Lest there be any doubt, the Supreme Court established in Pennsylvania Dental Association, 512 Pa. at 227, 516 A.2d at 652, that mandamus does not "review or compel the undoing" of a public official's action. Here, the Secretary has exercised his discretion; that Petitioners do not like the result does not entitle them to a writ of mandamus.
Every person who disagrees with the outcome of a public official's exercise of discretion believes that public official has been "mistaken" or "arbitrary." To allow a mandamus action in such circumstance would give redress to any person who believes herself aggrieved by the public official's exercise of discretion. This turns mandamus into a type of appeal forbidden by our Supreme Court in Pennsylvania Dental Association, 512 Pa. at 227, 516 A.2d at 652.
Mandamus simply does not lie to compel the exercise of the Secretary's discretion in a particular way. The Supreme Court's direction on this point is clear:
[I]t is the discretion and judgment of the official (who is vested with discretionary *54 power) which prevails and not that of a court or a jury or a person aggrieved; and a Court cannot compel such official to exercise his discretion in a manner which will produce a result which the court may deem wise or desirable.

Maxwell v. Farrell School District Board of Directors, 381 Pa. 561, 566, 112 A.2d 192, 195 (1955) (emphasis added). The majority wants to hold a hearing to force the Secretary to exercise his discretion in a way that will produce a "wise and desirable" result. This is error. I would sustain the Secretary's demurrer to the extent Petitioners seek to have this Court issue a writ of mandamus to the Secretary (1) to adopt "rational" certification and testing guidelines and (2) to decertify the seven DRE voting systems at issue in the petition.[5]
What is not so clear is whether the Secretary can be compelled to reexamine four of the seven DRE voting systems as requested by Petitioners. Each reexamination request was made by ten or more electors who have tendered $450. The Secretary denied Petitioners a reexamination because "no credible evidence has been provided to this Department or come to our attention that any change or modification has been made to this system." Petition ¶ 96. It is not clear that the Secretary can impose this condition upon a request for reexamination, given the language of the Election Code.
A reexamination may be undertaken at the request of a manufacturer, at the Secretary's initiative or at the request of electors. Section 1105-A(a) of the Election Code states, in relevant part, as follows:
(a) Any person or corporation owning, manufacturing or selling, or being interested in the manufacture or sale of, any electronic voting system, may request the Secretary of the Commonwealth to examine such system . . . Any ten or more persons, being qualified registered electors of this Commonwealth, may, at any time, request the Secretary of the Commonwealth to reexamine any electronic voting system theretofore examined and approved by him. Before any reexamination, the person, persons, or corporation, requesting such reexamination, shall pay to the Treasurer of the Commonwealth a reexamination fee of four hundred fifty dollars ($450). The Secretary of the Commonwealth may, at any time, in his discretion, reexamine any such system therefore examined and approved by him. . . .
25 P.S. § 3031.5(a) (emphasis added). Upon receipt of such a request, the Secretary "shall examine the electronic voting system. . . ." Section 1105-A(b), 25 P.S. § 3031.5(b). In short, Section 1105-A of the Election Code establishes that the Secretary has a mandatory duty to perform a reexamination upon proper request.
The Secretary contends, however, that he has discretion to deny a request for reexamination. In support, he directs the Court to Section 1105-A(d) of the Election Code, which states as follows:
When an electronic voting system has been so approved, no improvement or change that does not impair its accuracy, efficiency or capacity or its compliance with the requirements hereinafter set forth, shall render necessary the reexamination or reapproval of such system.
*55 25 P.S. § 3031.5(d). The Secretary reads this provision to mean that there must be a change that impairs an electronic voting system before he has to undertake a reexamination, whether on his own initiative or upon request of a manufacturer or ten electors. That is one reading. Another reading is simply that a change to an approved electronic voting system, no matter how small, does not in itself nullify a prior approval or compel the Secretary to reexamine a system.
The language of Section 1105-A(b) of the Election Code is plain and direct. Upon receipt of a request for reexamination, the Secretary must examine the electronic voting system. 25 P.S. § 3031.5(b). It does not contain a "provided, however" exception that references Section 1105-A(d). It is up to the Secretary how to examine the electronic voting system, but examine it he must under the most straightforward reading of Section 1105-A(a) of the Election Code.
A writ of mandamus can be used to compel an official to exercise discretion where he refuses to do so. Our Supreme Court has explained this principle as follows:
But where by a mistaken view of the law or by an arbitrary exercise of authority there has been in fact no actual exercise of discretion, the writ will lie.
Tanenbaum v. D'Ascenzo, 356 Pa. 260, 263, 51 A.2d 757, 758 (1947). A public official's refusal to act could be intentional, i.e., arbitrary, or unintentional, i.e., the result of a mistaken view of the law.[6] Where there has been no exercise of discretion, a writ of mandamus will lie.
I would overrule the Secretary's demurrer to the Petitioners' request for a writ of mandamus ordering the Secretary to reexamine four of the DRE voting systems. It goes without saying, however, that the content of the reexamination reports is beyond our review in a mandamus action. As explained by our Supreme Court,
[w]here the [public official] is clothed with discretionary powers, and has exercised those powers, mandamus will not lie to compel a revision of the decision resulting from such exercise of discretion, though in fact, the decision may be wrong.
Anderson v. Philadelphia, 348 Pa. 583, 587, 36 A.2d 442, 444 (1944).
Petitioners' real complaint, apparently, is with the performance of specific computers that have been acquired by County Boards of Elections. There are many reasons why computers do not perform on election day to specifications: problems may arise from a defect in one computer; an improper installation of a good computer; or a lack of training by those working at the polling places. These problems are *56 not of the Secretary's making or within his ability to solve.
The Secretary reviews electronic voting systems to determine that they have been designed to satisfy the specifications set forth in Section 1107-A of the Election Code. The Secretary does not inspect each machine within a particular system to ensure it does not contain a manufacturing flaw or defect. His certification is not the equivalent of a manufacturer's warranty. Such flaws, if any, are for the county and the manufacturer to resolve.
If Petitioners' constitutionally protected right to vote has been abridged in a particular county or at a particular polling place, this may be redressable in equity. The proper defendants, in such an action, are the counties. This was the approach taken by electors in Allegheny County in Taylor v. Onorato, 428 F.Supp.2d 384 (W.D.Pa. 2006).[7] Concluding that the plaintiffs in Taylor were not likely to succeed on the merits of their constitutional claims, the U.S. District Court denied the request for a preliminary injunction. The court explained its decision as follows:
[I]t is of course possible that one or more of the electronic machines may malfunction on election day, just as the lever machines in the past have from time-to-time malfunctioned on election day. No election system is perfect and no machine built by man is infallible. Voting machine malfunction has been, and probably always will be, a potential problem in every election.
Taylor, 428 F.Supp.2d at 388. These are wise observations with relevance to Petitioners' claims against the Secretary: the best approval process guided by the strictest statutory standards will not guarantee perfect electronic voting devices in each county.
I agree with the Secretary that the County Boards of Elections are indispensable parties. They made the decision to purchase one of the seven DRE voting systems approved by the Secretary. They will be affected by the decision of this Court, should it decide to order the Secretary to decertify the seven DRE voting systems. Their absence leaves this Court without jurisdiction over Counts I, II, III, IV, V, VIII, IX, and X of the petition. See, e.g., Polydyne, Inc. v. City of Philadelphia, 795 A.2d 495, 496 n. 2 (Pa. Cmwlth.2002) (this Court held it lacked jurisdiction in action brought by disappointed bidder, because winning bidder had not been named as a party and the winning bidder's interests would not be represented by the city).
For all these reasons, I would sustain the Secretary's demurrer to the petition to the extent it seeks to compel the exercise of the Secretary's discretion in a particular way. Because Petitioners have failed to name indispensable parties, i.e., the County Boards of Elections, as respondents, I would sustain the Secretary's demurrer to Counts I, II, III, IV, V, VIII, IX and X for lack of jurisdiction. The fundamental flaw in Petitioners' case is that they would have this Court substitute its judgment for the Secretary's, which is inappropriate in an action presented as an appeal; in an action at law, such as mandamus; or in a suit in equity. However, I would allow the case to go forward on the single question raised in Count VI, i.e., whether the Secretary can be compelled by a writ of mandamus to do a reexamination of the DRE voting systems upon request of ten electors.
*57 Judge LEADBETTER and Judge COHN JUBELIRER join in this dissenting opinion.
NOTES
[1]  The Secretary has certified the following DREs: the AVC Edge II and the AVC Advantage, made by Sequoia Voting Systems, Inc.; the iVotronic, made by Elections Systems & Software, Inc.; the eSlate, made by Hart InterCivic, Inc.; the ELECTronic 1242, made by Danaher Industrial Controls; the AccuVote TSX, made by Diebold Election Systems, Inc.; and the WINvote, made by Advanced Voting Solutions. (Petition, ¶ 40.)
[2]  The above failures occurred in elections conducted from November 2002 to May 2006. We note that the "zero tape" problems, the failure to record votes due to programming errors, the failure to activate and the failure to record write-in votes are problems that occurred in Pennsylvania elections. (Petition, ¶¶ 64-66.)
[3]  Act of June 3, 1937, P.L. 1333, as amended, 25 P.S. §§ 2600-3591.
[4]  Added by section 4 of the Act of July 11, 1980, P.L. 600, as amended, 25 P.S. § 3031.5.
[5]  We note that, under Rule 1030(a) of the Pennsylvania Rules of Civil Procedure, all affirmative defenses, including immunity from suit, shall be pled in a responsive pleading under the heading of "New Matter." Pa. R.C.P. No. 1030(a); see Madden v. Jeffes, 85 Pa.Cmwlth. 414, 482 A.2d 1162, 1164 n. 2 (1984) (noting that Pa. R.C.P. No. 1030 "requires that an immunity claim be pleaded as an affirmative defense in a responsive pleading under new matter"). However, in Stackhouse v. Pennsylvania State Police, 892 A.2d 54 (Pa.Cmwlth.), appeal denied, 588 Pa. 760, 903 A.2d 539 (2006), this court noted that the matter may be raised in preliminary objections when to delay a ruling on the matter would serve no purpose.
[6]  The Secretary also argues that, under sections 501(b)(2) and 701(b)(1) of the Administrative Agency Law, 2 Pa.C.S. §§ 501(b)(2) and 701(b)(1), proceedings before the Secretary under the Election Code are not subject to judicial review. (Secretary's brief at 22.) However, these provisions of the Administrative Agency Law pertain to appellate review of Commonwealth agency adjudications, and the action here is brought in this court's original jurisdiction. See section 702 of the Administrative Agency Law, 2 Pa.C.S. § 702.
[7]  The Secretary argues that, because some of Electors' allegations use the terms "if," "may," "might," or "risk," the alleged harm to their interest may never occur and, thus, is not immediate or ripe. (Secretary's brief at 42.) However, Electors use the terms "if," "may," "might," and "risk" because Electors do not allege that the challenged systems malfunction every time a vote is cast. As indicated above, Electors allege that the machines are not reliable or consistent in recording votes cast and that Electors have no way of knowing whether a DRE recognizes their votes. In our view, the fact that Electors have no way of knowing whether the votes they cast on a DRE have been recorded and will be counted gives Electors a direct and immediate interest in the outcome of this litigation.
[8]  Even if we were to consider the laches issue, we note that the November 2006 General Election has passed. Thus, the Secretary cannot allege prejudice from the proximity of the filing to the occurrence of the General Election.
[9]  Added by section 4 of the Act of July 11, 1980, P.L. 600, 25 P.S. § 3031.1. Section 1101-A defines "electronic voting system" as: "a system in which one or more voting devices are used to permit the registering or recording of votes and in which such votes are computed and tabulated by automatic tabulating equipment. The system shall provide for a permanent physical record of each vote cast." 25 P.S. § 3031.1 (emphasis added).
[10]  Pa. Const., art. VII, § 4. Article VII, Section 4 states that all elections shall be by ballot, or by such other method as may be prescribed by law, provided that secrecy in voting be preserved.
[11]  The Secretary notes that bills have been introduced into the legislature that would require a voter verified independent record. (Secretary's brief at 24, n. 11.)
[12]  We fail to comprehend this claim, and the Secretary offers no explanation. (See Secretary's brief at 24 n. 12.) If the Secretary is arguing that a paper record of a vote cast jeopardizes secrecy in voting, then every paper ballot jeopardizes secrecy in voting.
[13]  The Secretary asserts that Electors do not claim that the Secretary's certification process is intentionally discriminatory. (Secretary's brief at 32.) However, Electors' equal protection claim is based on the disparate effect of the Secretary's certification process.

The Secretary also asserts that no voting system is perfect and that the possibility of malfunction does not constitute an equal protection violation. (Secretary's brief at 32-33.) However, Electors allege that, unlike any other voting system, the challenged DREs have no meaningful recount or audit mechanisms when they malfunction.
[14]  Added by section 4 of the Act of July 11, 1980, P.L. 600, 25 P.S. § 3031.7. Electors allege that the Secretary's testing procedures were insufficient to determine whether a DRE was: (1) "suitably designed for the purpose used," "safely and efficiently useable in the conduct of elections," and "designed and equipped to be capable of absolute accuracy" in the counting of ballots, 25 P.S. § 3031.7(11); (2) able to provide "acceptable ballot security procedures," 25 P.S. § 3031.7(12); and (3) able to record correctly and compute and tabulate accurately every valid vote registered, 25 P.S. § 3031.7(13). (Petition, ¶ 117.)
[1]  Act of June 3, 1937, P.L. 1333, as amended, 25 P.S. §§ 2600-3591.
[2]  There are more than seventeen, considering the subparts to the standards at Section 1107-A (16) and (17), 25 P.S. §§ 3031.7(16)(i)-(v), (17)(i)-(iii).
[3]  Petitioners pursue relief under several theories: mandamus, declaratory judgment and equity.
[4]  The majority cites to County of Allegheny v. Commonwealth, 518 Pa. 556, 544 A.2d 1305 (1988) for the basic principles of mandamus. While I do not disagree with the recital, I note that County of Allegheny is not a mandamus case but an injunction case. Camiel v. Thornburgh, 507 Pa. 337, 489 A.2d 1360 (1985) is cited for the proposition that mandamus can compel discretionary acts where the exercise is "arbitrary" or "mistaken." In Thornburgh, the issue was whether the governor's facsimile signature on a Turnpike bond issue could be compelled by mandamus; the petition was denied because the matter was not ripe. Duncan Meter Corp. v. Gritsavage, 361 Pa. 607, 610, 65 A.2d 402, 403 (1949) is cited for the proposition that mandamus lies to compel "proper action" where discretion has been abused. In Duncan, a city controller was ordered to countersign a voucher warrant drawn on the city treasury to pay the plaintiff, who had done work for the city. The controller had refused because he believed the contract under which the plaintiff performed the work was breached. The Supreme Court explained that it was "neither the right nor the duty of the city controller to determine whether a contract is breached or whether a breach should be acted upon." Id. at 612, 65 A.2d at 404. The Supreme Court approved the writ of mandamus in this circumstance. In any case, Duncan, decided in 1949, has been followed by the Supreme Court's clear holding in Pennsylvania Dental Association that mandamus does not allow a court to interfere with the exercise of an official's discretion.
[5]  The Secretary is also correct that sovereign immunity bars mandatory injunctive relief. The majority dismisses this argument by concluding that the only relief sought is a writ of mandamus.
[6]  In a subsequent restatement of Tanenbaum, the Supreme Court stated:

It is well settled that in a mandamus proceeding a court can compel a public official who is vested with a discretionary power to exercise that discretion; but (unless the discretion is arbitrarily or fraudulently exercised or is based upon a mistaken view of the law) it cannot interfere with or control the official's discretion or judgment. Expressed another way, it is the discretion and judgment of the official (who is vested with a discretionary power) which prevails and not that of a court or a jury or a person aggrieved; and a Court cannot compel such official to exercise his discretion in a manner which will produce a result which the Court may deem wise or desirable.
Maxwell, 381 Pa. at 566, 112 A.2d at 195 (1955) (emphasis added). Taken out of context, the parenthetical phrase in the first sentence of the above-quoted passage can be read to mean that an arbitrary exercise of discretion is open to court interference. Read in its entirety, it is clear that discretion belongs to public officials, not to courts and not to plaintiffs.
[7]  See also Kuznik v. Westmoreland County Board of Commissioners, 588 Pa. 95, 902 A.2d 476 (2006) (vacating this Court's injunction requiring Westmoreland County to abandon its plan to use a DRE voting system).
