Opinion by
Mr. Justice Moschzisker,
By an order duly entered in a proper proceeding the court below adjudged that P. C. Foy was not the nominee of the Republican party for the office of school director, and directed that his name should not appear upon the ballot as the candidate of that party. Notwithstanding this order the county commissioners had the name printed upon the ballot in connection with the party appellation “Republican.” The name of Foy also appeared in connection with the appellation “Peopled Party;” to which latter nomination he had an unquestioned right. Foy’s opponent was one Gibbons, the nominee of the Democratic and Independent parties. The election officers returned sixty-one Republican and 123 People’s party votes for Foy, and 159 Democratic and sixteen Independent votes for Gibbons; giving Foy a majority of nine. The certificate of election was awarded to Foy. A contest was begun on behalf of Gibbons; and it was claimed that the sixty-one votes returned for Foy as the Republican candidate should be rejected for the reason that his name was illegally upon the ballot *16Ihconnection with -that party appellation. The-'court below found that of these sixty-one votes) eleven word represented by straight, party ballots.marked in .the Republican square, one of the eleven also bearing a mark for Foy where his- name appeared as the candidate of the “People’s Party” in another column; and' that the fifty remaining votes were represented by ballots marked for Foy in this same other column where he appeared as a candidate of the Republican party. On these facts the learned court below stated the following conclusion: “We are clearly of the opinion that the eleven straight Republican ballots, including the one with the double marking, should not have been counted for P. C. Foy. The remaining fifty ballots marked with the cross opposite the name of P. C. Foy on the Republican ticket we think should be counted for Foy. This marking clearly evidences the intention of the voter to vote for Foy, and we cannot say that he would'not have received these votes irrespective of what ticket his name might have appeared upon.” Two votes were stricken from the number returned for Gibbons. The result reached was a vote of 173 for each candidate. The court'below entered a decree adjudging that the election resulted in a tie; and directed Foy and Gibbons to determine the tie' by' drawing lots ' in accordance with the act of assembly in such case made and provided; the costs of the proceedings to be paid by Foy. The case is before this court on certiorari at the instance of Foy. It is now settled definitely that a contested election case partakes both of the nature of an action at "law and of a suit in equity, and that on certiorari this court is not limited to a formal examination of the 'record, but may review the conclusions of law and the decree entered by the court below: Independence Party Nomination, 208 Pa. 108; Chester County Republican Nomination, 213 Pa. 64; Mulholland’s Case, 217 Pa. 631; Von Moss’s Election, 219 Pa. 453; Krickbaum’s Contested Election, 221 Pa. 521. In such cases we inspect the record, to determine whether the lower court has exceeded its •powers or has abused the discretion conferred by the'statute: In re Nomination of Robb, 188 Pa. 212. Wherever the right to review exists, the power to correct follows as a necessary *17corollary. As early as 1862, on certiorari, in the contested election of Chase v. Miller, 41 Pa. 403, Mr. Justice Woodward stated: “For one hundred and forty years the general jurisdiction of this court has been declared by statute to extend to the examination and correction of all and all maimer of error of justices, magistrates, and courts of the commonwealth, in the process, proceedings, judgments and decrees, as well in criminal as in civil proceedings, .... except where such review is expressly excluded by statute; . . . . but this statement is to be received with the very important qualification — that the errors to be reviewed shall be on the record. . . . Our correctional powers in such cases extend no further than to keep the court within the limits of its jurisdiction, and to see that that is exercised with regularity according to law.” And later on in the opinion it is said: “The inability of this court to review a decree of the quarter sessions on its merits, springs not from any organic defect of jurisdiction, but from the want of a bill of exceptions to certify us of the facts.” It has been repeatedly ruled in our recent decisions that in election cases we can get the facts from the record and the opinion of the court below. When the facts are ascertained, we have the right to correct all erroneous conclusions, judgments, or decrees based thereon: Babcock v. Day, 104 Pa. 4; Woodward v. Carson, 208 Pa. 144.
The question in this case is, did the court below, upon the facts shown by the record, draw the proper conclusions and enter the decree required by the statute?
There was no mistake or irregularity in the actual marking of the ballots — with the possible exception of the one with the double mark — but the difficulty arises from the printing thereon of Foy’s name as the candidate of a party that he did not represent. If we regard the appearance of Foy’s name upon the ballot in connection with the appellation “Republican” as absolutely unlawful and void, then it follows not only that all his strictly straight Republican votes should be thrown out, but likewise the fifty votes marked for him individually opposite the appellation “Republican.” This view defeats Foy and gives the office to a man who did not com*18mand a majority of the qualified voters of the district. If the other view be taken, that the name of Foy was on the ballot as the Republican candidate under a color of right, and therefore the electors who voted for him in that connection should not be disfranchised as against other electors, then not only the fifty votes which the court gave to him should be counted, bht also all of the strictly straight Republican votes; for the Act of April 29, 1903, P. L. 338, sec. 29, expressly provides that, every mark within a straight party square shall be “equivalent to a- mark against every name designated by that political appellation” in the other-column. This would give the office to Foy through a defiance of the solemn order of the court, involving the issuance of defective ballots calculated to mislead and deceive the voters. When the electors who knew of the decision of the court that Foy was not the Republican nominee saw his name upon the ballot as the candidate of that party, they may well have been misled into the thoúght that the order had been reconsidered, or if not actually so misled, they must at least have been confused; and those who had no knowledge of the decision were deceived by the unlawful presence of his name upon the ballot. On such a condition of affairs, no one can possibly tell how the sixty-one electors who voted for Foy as a Republican candidate would have voted had his name not so appeared upon the ballot; nor is there any way of knowing how many of these voted for him simply on the ground that he represented the policies of that party. The only purpose of -placing a party appellation beside a name is to show the policies represented by the candidate, and it is too well known to be ignored that electors more often vote for a candidate because of the party he represents than for reasons personal to the man himself. Looking at all the facts shown on the record, the conclusion is irresistible that this is an instance where the ballots, by reason of the unlawful addition of the name of Foy in connection with the Republican party appellation, were so defective as to be calculated to mislead the voters, and that this may have affected the result of the election. Under such circumstances, what was the duty of the court below? The question is answered in plain terms *19by the Act of April 14, 1897, P. L. 23, wherein it is provided: "Whenever in any contested election the tribunal trying the case shall decide that the ballots used .... were, by reason of the omission, addition, misplacing, misspelling or misstatement of one or more titles of offices, or names of candidates, or parties or policies represented by them, so defective as to the office in contest as to be calculated to mislead the voters in regard to any of the candidates nominated for said office, and that the defective condition of the said ballots may have affected the result of the entire election for the said office, the said tribunal shall declare the election to be invalid as regards the said office, and shall report their decision to the proper officer or officer's who are now by law authorized to fill vacancies occurring in such office, who, upon receipt of such notice, shall without delay proceed to appoint a suitable person or persons to fill the vacancies thus created, and the person or persons so appointed, shall continue in office until the next election succeeding his appointment at which such office is now by law required to be filled.”
The act carries with it the right to the exercise of judicial discretion in deciding the question as to whether or not the ballots used were calculated to mislead the voters; but "'judicial discretion never means the arbitrary will of the judge; it is always a legal discretion to be exercised in discerning the course prescribed by law, and when that is discerned it is the duty of the court to follow it:” 9 Am. & Eng. Ency. of Law (2d ed.), p. 473.
A court ought always to be slow to set aside an election for any office, but when the legislature has ordained that under a certain state of facts it shall so act, and such facts plainly appear upon the record, the duty is clear, and there should be no hesitation about declaring the election invalid. The failure of the court below to decide on the facts presented in this record that “ the ballots used were so defective as to the office in contest as to be calculated to mislead the voters” in regard to Toy’s candidacy and the “parties or policies represented” by him, and that “the defective condition of said ballots may have affected the result of the election,” was in law an abuse of *20the discretion conferred by the statute. "Where after finding the fundamental facts, the trial court plainly, fails to draw the proper deductions therefrom and to act thereon according to the requirements of the statute, it is the d.uty of this court either to make the necessary corrections or to remit the record for that purpose. Since the act of 1897 requires certain ministerial acts to be performed after an election is declared invalid, the record in this case will be remitted:
The court below fell into error in ordering the contestant Foy to pay the costs. Under the Act of April 28, 1899, P. L. 103, in election contests, the trial court has power to-use its discretion as to whom it will charge with certain of the costs when the time consumed in taking testimony exceeds ninety days; but there is nothing in the present record to show when the taking of testimony commenced or how. much time was thus consumed. The liability for the costs in this case is provided for by the Act of April 28, 1899, P. L. 118; and thereunder, when the contestant fails to establish his right to the office in question, the petitioners must pay the costs: Thirty-eighth Ward Election, 35 Pa. Superior Ct. 256.
The third assignment of error is sustained; the decree is set aside; and the record is remitted so that the court below may enter a proper decree declaring the election for the office in question to be invalid, as provided in the act of April 14,1897, and as indicated in this opinion. The costs to be paid by the petitioners.