
493 P.2d 701 (1971)
94 Idaho 542
The STATE of Idaho, Plaintiff-Respondent,
v.
Edwin J. ASH, Defendant-Appellant.
No. 10723.
Supreme Court of Idaho.
December 30, 1971.
Rehearing Denied January 27, 1972.
*702 Rapaich & Knutson, Lewiston, for appellant.
W. Anthony Park, Atty. Gen., and Martin R. Ward, Deputy Atty. Gen., Boise, for appellee.
DONALDSON, Justice.
This appeal is taken by Edwin J. Ash from a judgment of conviction of injuring a public jail. The following chronology of events preceded the trial at which he was convicted of this offense. On March 12, 1970, appellant appeared for arraignment before District Judge John H. Maynard, in the District Court of the Second Judicial District, in and for the County of Nez Perce; this proceeding was continued until March 19, 1970, at which time it was again continued until March 23, 1970. On March 23, the defendant refused to plead, and the court thereupon entered a plea of not guilty in his behalf and, on its own motion, ordered a change of venue to Ada County, on the ground that the court had concluded from its own investigation that the defendant could not receive a fair trial in Nez Perce County because great prejudice existed in that county against him. On March 24, appellant filed a demurrer to the information in the Nez Perce County District Court; on this same day, the formal order transferring the cause to Ada County was filed.
On April 21, 1970, in the District Court for the Fourth Judicial District, in and for the County of Ada, appellant requested that venue be changed back to Nez Perce County; after a hearing, the court ordered the case retransferred to Nez Perce County for further proceedings.
Back in Nez Perce County once again, defense counsel was notified on Wednesday, April 22, 1970, that the case would be tried by Judge Maynard on the following Monday, April 27, 1970, at 9:30 a.m. On April 23, 1970, counsel for the defendant filed an affidavit of prejudice for the disqualification of Judge Maynard, under the provisions of I.C. § R 1-1801. Sometime on April 22, 23 or 24 (it is not clear from the record exactly when), April 24 was fixed as the date for hearing arguments on the defendant's demurrer to the information. At the hearing held on April 24, Judge Maynard ruled that the affidavit of prejudice was not timely; he then denied the demurrer. Trial commenced on April 27, and the jury returned its verdict on April 28, 1970, finding the defendant guilty as charged.
The appellant contends that the district judge erred in failing to disqualify himself. *703 The portion of I.C. § R 1-1801 which is applicable to this case reads as follows:
"A judge cannot act as such in any of the following cases:
* * *
4. When either party makes and files an affidavit as hereinafter provided, that he has reason to believe, and does believe, he cannot have a fair and impartial hearing or trial before a district judge by reason of the bias or prejudice of such judge. Such affidavit may be made by any party to an action, motion or proceeding, personally, or by his attorney or agent, and shall be filed with the Clerk of the District Court in which the same may be pending at least five (5) days before the day appointed or fixed for the hearing or trial of any such action, motion, or proceeding, (providing such party shall have had notice of the hearing of such action, motion, or proceeding for at least the period of five (5) days, and in case he shall not have had notice for such length of time, he shall file such affidavit immediately upon receiving such notice). Provided further that no such affidavit may be filed in any case after any contested matter in relation to such litigation has been submitted for decision to any judge sought to be disqualified, excepting that where a new trial is granted or ordered by either the district court or the Supreme Court, such affidavit may be filed as in the first instance. Upon the filing of the affidavit, the judge as to whom said disqualification is averred shall be without authority to act further in the action, motion, or proceeding, but the provisions of this section do not apply to the arrangement of the calendar, the regulation of the order of business, the power of transferring the action or proceeding to some other court, nor to the power of calling in another district judge to sit and act in such action or proceeding, providing that no judge shall so arrange the calendar so as to defeat the purpose of this section." Emphasis supplied.
In Stevens v. McQuade, 78 Idaho 162, 299 P.2d 95 (1956), this Court held that where the defendants' counsel had more than five days' notice of a hearing on the defendants' demurrer, an affidavit of prejudice filed only one day prior to the date set for the hearing was not timely under I.C. § R 1-1801. In the case at bar, less than five days elapsed between the return of the case to Nez Perce County and the hearing on the demurrer; therefore, the appellant's counsel could not have had five days' notice of the hearing. The statute provides that in such a situation an affidavit of prejudice does not have to be filed until "immediately" after notice of the hearing is received. Here, notice of the hearing could not have been received any earlier than April 22, and the affidavit was filed on April 23. This filing was sufficiently immediate to satisfy I.C. § R 1-1801. See State v. Bitz, 89 Idaho 181, 404 P.2d 628 (1965) ("immediately" defined as "within such convenient time as is requisite for doing the thing").
Respondent contends, however, that the appellant's affidavit of prejudice was not timely under that part of the statute which provides that "no such affidavit may be filed in any case after any contested matter in relation to such litigation has been submitted for decision to any judge sought to be disqualified." Relying on Ex parte Medley, 73 Idaho 474, 253 P.2d 794 (1953), the state submits that the appellant's refusal to plead on March 23, 1970, constituted a contested matter submitted to Judge Maynard for decision (whereupon he entered a plea of not guilty in the appellant's behalf). In the Medley case, the defendant entered a plea of guilty, placed himself at the mercy of the court, and then sought and was granted clemency; on these facts, it was held that a contested matter had been submitted to the judge for decision. The case at bar is obviously distinguishable from Medley; here, appellant's refusal to plead presented the judge with no decision at all  he was bound to enter a plea of not guilty. I.C. § 19-1720; *704 cf. I.C. § 19-1710. Therefore, the defendant's mere refusal to plead did not constitute a contested matter submitted for decision. Hence, we conclude that the defendant was entitled to file the affidavit of prejudice, and the district court erred in holding that the affidavit was not timely.
Since we hold that the affidavit of prejudice was timely, and since it appears sufficient in all other respects, it is not necessary for us to examine the record to determine whether actual prejudice against the defendant existed. Upon the filing of an affidavit of prejudice in conformance with the provisions of I.C. § R 1-1801, the presiding judge is automatically disqualified. The filing of such an affidavit is sufficient to disqualify the judge without any hearing on its truth or falsity, and regardless of whether he is actually prejudiced as a matter of fact. It deprives that judge of all jurisdiction except for the power to transfer the case or to call in another judge, as permitted by the statute. State v. Bitz, 93 Idaho 239, 460 P.2d 374 (1969); I.C. § R 1-1801. The statute specifically provides that subject to the stated exceptions, the judge "shall be without authority to act further." Upon the filing of the affidavit of prejudice with the clerk of the district court on April 23, the district judge was without authority to proceed further; hence, the subsequent trial and conviction must be declared invalid in all respects.
Even though a new trial is being granted in this case, it is proper for this Court to consider other assignments of error which are necessary to the final determination of the case. I.C. § 1-205. The appellant contends that the district court for Nez Perce County erred in changing venue on its own motion. The question whether a court may change the venue of a criminal case sua sponte is one of first impression in Idaho. When the issue has been presented in the context of a civil case, however, this Court has held that a trial court is without power to change venue on its own motion. Butterfield v. Hatch, 85 Idaho 527, 381 P.2d 285 (1963); Bistline v. Eberle, 85 Idaho 167, 376 P.2d 501 (1962); Holt v. Warf, 33 Idaho 350, 194 P. 475 (1920) (overruled on another point in Anderson v. Springer, 78 Idaho 17, 296 P.2d 1024 [1956]). Section 19-1801 of the Idaho Code provides that a criminal action may be removed on the application of the defendant on the ground that a fair and impartial trial cannot be had in the county where the action is pending. Section 19-1808 provides for a similar application by the state. The new criminal rules also provide that either party may ask for a change of venue but say nothing about a change of venue on the court's own motion. I.C.R. Rule 21.[1] By analogy to the civil cases cited above, these statutes and this rule are exclusive  that is, the court can change venue only on the application of either the defendant or the state and not on its own motion. Moreover, there is a good reason for this rule: under it, both parties have an opportunity to present their views on the necessity for a change of venue to the court before its decision on the issue. See State v. Miles, 43 Idaho 46, 248 P. 442 (1926). While it was error for the district court in Nez Perce County to change the venue of this case to Ada County on its own motion, this error was cured when the district court in *705 Ada County, on the defendant's motion, transferred the case back to Nez Perce County, where the trial finally took place. Hence, the error was harmless and without prejudice to any of the defendant's rights.
The appellant further contends that the acts prohibited by I.C. § 18-7018[2] (a felony) are indistinguishable from those falling within the prohibition of I.C. § 18-7001[3] (a misdemeanor), and that neither statute provides a standard to guide the prosecutor in deciding under which statute to proceed. The appellant submits that there is no reasonable basis for making the destruction of property a felony in one section and a misdemeanor in another, and that the action of the legislature in doing so was arbitrary; therefore, he claims that his conviction under I.C. § 18-7018 was a denial of equal protection of the laws.
The equal protection clause of the Fourteenth Amendment does not deny to a state the power to treat different classes of persons in different ways. Reed v. Reed, 404 U.S. 71, 92 S.Ct. 251, 30 L.Ed.2d 225 (1971). In exercising its police power, a state has wide discretion to classify, and a classification is subject to attack only when it is without any reasonable basis or purely arbitrary. Graham v. Richardson, 403 U.S. 365, 91 S.Ct. 1848, 29 L.Ed.2d 534 (1971); Morey v. Doud, 354 U.S. 457, 77 S.Ct. 1344, 1 L.Ed.2d 1485 (1957); Malloroy v. State, 91 Idaho 914, 435 P.2d 254 (1967); Ex parte Knapp, 73 Idaho 505, 254 P.2d 411 (1953); State v. Evans, 73 Idaho 50, 245 P.2d 788 (1952). A classification is not unreasonable or arbitrary where it is made with reference to the heinousness or gravity of the acts which are made crimes. Malloroy v. State, supra. The legislature has concluded that damaging a jail is a more serious criminal act than damaging other real or personal property. This conclusion is not without a reasonable basis. When damage is done to a jail, inmates may escape; prisoners may have to be removed from the premises, and movement always creates security problems. Where a window is broken, as in this case, pieces of glass may be easily concealed on an individual's person; various dangerous uses can be made of it  e.g., as a weapon for attacking guards or other prisoners, or as an implement to effect an escape. Since the felony-misdemeanor classification challenged here is reasonably related to the gravity of the acts which are made crimes, the appellant has not been denied equal protection of the laws.
The appellant has assigned several additional errors, but they are either without merit or moot in light of our decision to order a new trial in this case.
Reversed and remanded for a new trial.
McQUADE, C.J., McFADDEN and SHEPARD, JJ., and COGSWELL, D.J., concur.
On Denial of Petition for Rehearing
The respondent, State of Idaho, has requested a rehearing in this case on the basis that the Court did not adequately set forth in this opinion what constitutes a jail. The appellant in his appeal claimed that the windows allegedly broken by the appellant were not parts of a public jail, since a hallway separated the cell where appellant was confined from the wall containing the windows. We stated in our opinion, however, that injury to a jail was a more serious offense, a felony, than malicious injury to other real or personal property, a misdemeanor, and that this was a reasonable classification. The basis for *706 this holding was set out in the opinion as "Where a window is broken, as in this case, pieces of glass may be easily concealed on an individual's person; various dangerous uses can be made of it  e.g., as a weapon for attacking guards or other prisoners, or as an implement to effect an escape." When we used the term "jail" in the opinion, we used the term in its generally accepted meaning: "A building designated by law, or regularly used for the confinement of persons held in lawful custody." Black's Law Dictionary, rev. 4th ed. 1968, p. 968. A jail is more than a row of cells standing alone; in addition to cells, a complete public jail must, of necessity, also have hallways, access routes to the cells, a roof, walls, windows, and doors. The Petition for Rehearing is denied.
NOTES
[1]  NO. 21. CHANGE OF VENUE
(a) FOR PREJUDICE. The court upon motion of either party shall transfer the proceeding to another county if the court is satisfied that a fair and impartial trial cannot be had in the county where the case is pending.
(b) OTHER CASES. For the convenience of parties and witnesses, and in the interest of justice, the court upon motion of the defendant may transfer the proceedings as to him to another county.
(c) PROCEEDING ON TRANSFER. When change of venue is ordered the clerk shall transmit the files and records or certified copies thereof and any bail taken, to the clerk of the court of the receiving county." (effective, January 1, 1972).
[2]  "18-7018. Injuring jails.  Every person who wilfully and intentionally breaks down, pulls down or otherwise destroys or injures any public jail or other place of confinement, is punishable by fine not exceeding $10,000. and by imprisonment in the state prison not exceeding five years."
[3]  "18-7001. Malicious injury to property.  Every person who maliciously injures or destroys any real or personal property not his own, in cases otherwise than such as are specified in this code, is guilty of a misdemeanor."
