
262 N.W.2d 797 (1978)
Edward V. MORAVEK, Appellant,
v.
DAVENPORT COMMUNITY SCHOOL DISTRICT, Appellee.
No. 60293.
Supreme Court of Iowa.
February 22, 1978.
*798 James L. Sayre, and Charles E. Gribble, of Dreher, Wilson, Adams & Jensen, Des Moines, for appellant.
Charles E. Miller, of Lane & Waterman, Davenport, for appellee.
Considered by MOORE, C. J., and MASON, RAWLINGS, REES and UHLENHOPP, JJ.
MASON, Justice.
Plaintiff, Edward V. Moravek, appeals from ruling of the Scott District Court dismissing his petition in equity seeking a declaratory judgment establishing that his continuing teaching contract with the Davenport Community School District (District) was valid and enforceable for the 1975-76 school year and each successive year thereafter until it was properly terminated.
Plaintiff's claim for relief as asserted in his petition filed October 20, 1976, is based on the theory the District's refusal to comply with the grievance procedure provided in a master contract executed by the District and the teacher's representative, the Davenport Education Association, Inc., constituted a breach of the master contract. He further alleged that since the master contract incorporated his individual contract in its terms, a breach of the master contract constituted a breach of his individual contract.
Plaintiff further alleged the breach of the contracts made the District's action terminating his contract pursuant to section *799 279.13, The Code, 1975, null, void, illegal and, consequently, ineffective. In his prayer for relief plaintiff sought to have the court declare his continuing contract valid and enforceable until such time as it would be properly terminated pursuant to section 279.13, The Code, 1975. He also prayed for such other and further relief as the court might deem equitable and just.
November 9 the District filed a motion to dismiss Moravek's petition because it failed to state a claim upon which any relief could be granted. In support of its motion the District stated:
"1. Plaintiff has failed to exhaust the administrative remedies provided to him under Iowa Code § 279.13 by failing to request a public hearing to protest his termination.
"2. Plaintiff's Petition admits that all actions required by Iowa Code § 279.13 to terminate a teacher were taken.
"3. The provisions of the contract set forth as Exhibit C to plaintiff's Petition relating to the `grievance procedure' have no relation to teacher termination, and as applied to the question of teacher termination are ultra vires.
"4. Plaintiff's claim, if any, arose March 25, 1975 and is barred by the doctrine of laches."
After receipt and study of briefs and oral argument in support of and in resistance to the motion, the court dismissed Moravek's petition ruling in pertinent part as follows:
"I find that at the time in question that the exclusive means for terminating teacher contracts was by compliance with § 279.13, Code. I find that to the extent that the grievance procedure of the master contract purports to govern contract termination that such is without statutory authority, contrary to then public policy, and of no legal effect as to the contract between plaintiff and defendant as regards termination thereof. I find that by not demanding a public hearing under § 279.13 the plaintiff failed to exhaust his administrative remedies and accordingly is not entitled to judicial remedies."
Moravek was employed as a teacher by the District for the 1974-75 school year. He had been hired September 30, 1974. One month before he was hired, the District and the teachers' representative, the Davenport Education Association, Inc., had entered into an agreement entitled a master contract.
The master contract, which incorporated by reference each teacher's individual contract, contained a grievance procedure, Article VIII. Section 8-1 of that article provided the definition of a grievance was a "* * * claim by an employee, or the Association, based upon the interpretation, application, or violation of this Agreement." Section 8-2 of the article provided for a four-step grievance procedure. As summarized that procedure was as follows:
Step 1. Written statement of grievance with supervisor and report to the Superintendent;
Step 2. Conference with Director of Personnel or Superintendent;
Step 3. Appeal to Board of Education and hearing before Board; and
Step 4. Binding arbitration including involvement of federal mediation and conciliation service.
March 11, 1975, the District sent Moravek notice, pursuant to section 279.13, The Code, 1975, it was considering termination of his teaching contract. March 14, he requested a private conference and a written statement of specific reasons. March 18, the District sent Moravek notice the conference would be held March 24 and gave him its reasons for considering his termination. March 25, the date after the conference, the District sent Moravek a notice of termination of his contract and informed him he had a right to request a public hearing within 20 days of his receipt of the notice. He never exercised this right.
April 8, Moravek filed a grievance in which he stated:
"* * *
"Please accept this communication as my written appeal of that decision on dismissal, *800 as per the procedure provided for in Article 8-2 of the master contract * * *.
"With this grievance I am alleging that Articles 12-3 [requiring a written statement of his rating as a teacher be placed in his personnel file, that he be given a copy of it and that he be given an opportunity to give his reaction to the evaluation], 11-1 [stating an employee shall not be dismissed without just cause and without procedural due process], 11-2 [requiring that any disciplinary action against any employee shall be appropriate to the act which precipitated the discipline] and 3-1 [providing the Board will not interfere with, restrain, or coerce teachers covered by the master contract because of membership in the Association or lawful activity on behalf of the Association], were violated by the administration and Board of Education of the Davenport Community School District in the handling of the termination of my continuing contract."
April 9, the District informed Moravek it had scheduled a meeting as provided by step 2 of section 8-2. This meeting resulted in a finding by the District's director of personnel the grievance was not justified. April 24, Moravek responded by seeking from the District a time and place for step 3. He also advised the District he would be willing to waive step 3 and proceed immediately to step 4.
At a regularly scheduled board meeting on May 12, the Board of Education, pursuant to advice from its attorneys, voted to refuse to submit the matter to arbitration since it was the board's view the arbitrator would not have jurisdiction over the matter.
Moravek apparently did nothing further to thwart the District's attempt to terminate his contract until he filed his petition in this action.
The primary question presented by this appeal is whether the trial court erred in sustaining the District's motion to dismiss plaintiff's petition for failure to state a claim upon which any relief could be granted.
The grant or denial of a motion to dismiss does not rest in the discretion of the trial court; it must be determined upon legal grounds and is subject to review by this court. See Ambrose v. Harrison Mutual Insurance Association, 206 N.W.2d 683, 684 (Iowa 1973) and Symmonds v. Chicago, M., St. P. & P. R. Co., 242 N.W.2d 262, 264 (Iowa 1976).
"* * * [A] motion to dismiss a pleading for failure to state a cause of action is sustainable only when it appears to a certainty the pleader has failed to state a claim upon which any relief may be granted under any state of facts which could be proved in support of the claim asserted. In making this determination the pleading should be construed in the light most favorable to the pleader with doubts resolved in his favor and the challenged allegations accepted as true. * * * [citing authority].
"A motion to dismiss is a waiver of any ambiguity and uncertainty in the pleading. * * * [citing authorities]." Murphy v. First Nat. Bank of Chicago, 228 N.W.2d 372, 375 (Iowa 1975). See also Lewis v. State, 256 N.W.2d 181, 192-193 (Iowa 1977).
Grounds of a motion to dismiss a pleading because it does not state a cause of action must be based on the contents of the pleading assailed. Facts not so appearing, except those of which judicial notice must be taken, must be ignored. Such motions must specify wherein the pleading they attack is claimed to be insufficient. See Ke-Wash Company v. Stauffer Chemical Company, 177 N.W.2d 5, 9 (Iowa 1970); Osbekoff v. Mallory, 188 N.W.2d 294, 297 (Iowa 1971); Wheeler v. Waller, 197 N.W.2d 585, 586 (Iowa 1972); Freese v. Lemmon, 210 N.W.2d 576, 579 (Iowa 1973).
The parties contend that resolution of the principal question presented by this appeal requires determination of the following issues which we have framed in somewhat different language from that employed by the parties:
1. Does a teacher fail to exhaust his administrative remedies when he does not request a public hearing pursuant to section 279.13, The Code, 1975?
*801 2. Did section 279.13, The Code, 1975, provide the exclusive method of termination of teacher contracts?
3. Were the contractual grievance procedures here a valid method to resolve disputes over termination of a teacher's continuing contract?
In an equitable action, as here, our review is de novo. Rule 4, Rules of Appellate Procedure.
I. At one point in his argument in support of his contention the trial court erred in sustaining the District's motion to dismiss Moravek maintains the court relied upon a statement of facts the District included in its motion to dismiss. He insists this inclusion of facts other than those appearing in his petition made the motion the equivalent of a "speaking demurrer." For this reason, he believes the trial court should not have relied upon the statement of facts set out by the District in reaching its decision to sustain the motion.
In Griffith v. Red Oak Community School District, 167 N.W.2d 166, 171 (Iowa 1969), we explained speaking demurrers and found facts other than facts appearing in pleading attached could not be considered in a court's ruling on a motion to dismiss. There we stated:
"It must be conceded defendant's motion to dismiss is based on facts not stated in the petitiondetails of the August 28 and September 5 board meetings leading to plaintiff's dismissal under section 279.24.
"`Under our procedure a motion to dismiss is the successor to the demurrer and must be based upon matters alleged in the petition, admitting their truth for the purpose of testing their legal sufficiency. When demurrers were permitted, a demurrer grounded on claimed facts not alleged in the pleading attacked, was designated a "speaking" demurrer and courts disregarded such averments. To the extent a motion to dismiss offends in this manner it must also be disregarded. Bales v. Iowa State Highway Commission, 249 Iowa 57, 62, 86 N.W.2d 244, 247-248; Herbst v. Treinen, 249 Iowa 695, 699, 88 N.W.2d 820, 823.' Carmichael v. Iowa State Highway Commission, Iowa, 156 N.W.2d 332, 339."
In light of Moravek's contention we perceive two questions before us now. First, did the District present facts in its motion which were not contained in Moravek's petition? Second, did the trial court rely on such facts in sustaining the motion?
We have examined the support for the motion and find the four items set out previously are merely conclusions which are based upon facts raised in the petition. The only conclusion which could be said to be based upon facts not contained in the petition is the first.
As noted, in the first item the District stated Moravek failed to exhaust his administrative remedies under section 279.13 because he failed to request a public hearing to protest his termination. The fact he failed to protest by requesting a public hearing is, at least, inferentially present in the petition. Because Moravek alleged compliance with only the steps prior to the request for public hearing and failed to state compliance with the last step, it is reasonable to infer he did not do so.
This statement of fact by the District is not a statement of new fact. Moravek alleged compliance by both parties with the first steps of the procedure set out in section 279.13. Once he alleged such compliance, it was not an addition of new facts for the District to conclude he failed to comply with the last step.
The motion was not a "speaking" motion. Therefore, the reasons urged by plaintiff in contending the trial court erred in relying upon the statement of support in considering the District's motion are without merit.
II. The District maintains Moravek did not exhaust his administrative remedies because he failed to request a public hearing as was his right under section 279.13, The Code, 1975. The question is whether that section requires a teacher to exhaust its remedy before he may resort to the courts.
*802 The pertinent part of that section was as follows in 1975:
"* * * The teacher shall have the right to protest the action of the board, and to a hearing thereon, by notifying the president or secretary of the board in writing of such protest within twenty days of the receipt by him of the notice to terminate, in which event the board shall hold a public hearing on such protest * * *." (Emphasis supplied).
In determining the meaning of a statute, we are guided by well-established principles. In City of Cedar Rapids v. Moses, 223 N.W.2d 263, 268 (Iowa 1974), the court stated:
"The fundamental rule of statutory construction is to ascertain and, if possible, give effect to the intention or purpose of the legislature as shown by what the legislature has said, rather than what it should or might have said. A court may not, under the guise of construction, extend, enlarge or otherwise change the terms of a statute."
The following remarks from In re Marriage of Williams, 199 N.W.2d 339, 344 (Iowa 1972), are also pertinent here:
"This court has frequently stated:
"`The construction of any statute must be reasonable and must be sensibly and fairly made with a view of carrying out the obvious intention of the legislature enacting it.' * * * [citing authorities]."
With these general principles in mind we turn to the question before us. We are aided in our determination of whether the administrative remedy provided in section 279.13 must be exhausted prior to suit in court by the following remarks in City of Council Bluffs v. Pottawattamie Cty., 254 N.W.2d 18, 20 (Iowa 1977):
"Ordinarily an administrative remedy must be exhausted before courts will intervene to grant relief. * * * [citing authorities].
"In Rowen, [Rowen v. LeMars Mutual Insurance Company of Iowa, 230 N.W.2d 905, 909 (Iowa 1975)], supra, we said the exhaustion rule does not control unless two conditions are present. An administrative remedy must exist for the claimed wrong, and the statute must expressly or impliedly require that remedy to be exhausted before resort to the courts."
The parties do not dispute section 279.13 provides an administrative remedy and we agree it does.
We have carefully examined the portion of that section upon which the District relies for its contention herein and do not find an express or implied requirement that a teacher must exhaust the remedy provided before resort to the courts. The District's contention to the contrary is without merit. The trial court's finding reaching the conclusion urged by the District is, therefore, erroneous.
The District, apparently anticipating our holding herein, argues the trial court's finding was not, if erroneous, a crucial matter requiring reversal. In its brief before us, the District states, "* * * If plaintiff was entitled to judicial relief even though the administrative remedies had not been exhausted, the question becomes moot for the reason that plaintiff's contract with the District did not change the method of termination which the board was required to follow. Plaintiff concedes that the board properly terminated him in accordance with § 279.13, Code of Iowa (1975)."
We agree the error of the trial court does not necessarily require reversal. The court based its ruling upon several grounds only one of which has thus far been found erroneous. "In reviewing a ruling sustaining a motion to strike or dismiss, the same should be sustained if any of the grounds advanced are good, even though the one upon which the trial court based its ruling is not. * * [citing authority]." Ackerman v. James, 200 N.W.2d 818, 827 (Iowa 1972).
"* * * However, sustention of a motion to dismiss will not be upheld on a ground not asserted in trial court. * * * [citing authorities]." Rick v. Boegel, 205 N.W.2d 713, 716 (Iowa 1973).
In the next division we will consider the question whether the other grounds urged were good but before doing so we must dispose of one other matter here concerning *803 exhaustion of administrative remedies.
In its memorandum in support of its motion to dismiss the District contended, as it does on appeal, Moravek did not exhaust his administrative remedies under section 290.1, The Code, 1975, because he failed to appeal the termination decision to the State Board of Public Instruction.
Section 290.1 was in pertinent part as follows:
"Any person aggrieved by any decision or order of the board of directors of any school corporation in a matter of law or fact may, within thirty days after the rendition of such decision or the making of such order, appeal therefrom to the state board of public instruction; * * *." (Emphasis supplied).
Having applied the same rules here as in our previous discussion of section 279.13, this court concludes no language in section 290.1 either expressly or impliedly requires a teacher to exhaust the remedy provided by that section before resort to the courts. The District's contention to the contrary is without merit.
The trial court did not solely rely upon this ground in its sustention of the motion to dismiss and, in light of our conclusion, could not have properly done so.
III. Moravek contends the trial court erred in holding the exclusive means for terminating a teacher's continuing contract in 1975 was by compliance with the termination procedures set forth in section 279.13, The Code, 1975. He maintains other provisions in that section expressly authorize a board of directors of a school district and its teachers to agree mutually upon the terms and conditions of employment, without limitation, except as to the length of the contract. He insists this authorization includes the power to agree to a master contract which contains a grievance procedure under which a third party arbitrator decides whether to terminate a teacher's contract.
Moravek bases his argument on the following portion of section 279.13, The Code, 1975:
"279.13 Contracts with teachersautomatic continuationexchange of teachers. Contracts with teachers must be in writing, and shall state the length of time the school is to be taught, the compensation per week of five days, or month of four weeks, and that the same shall be invalid if the teacher is under contract with another board of directors in the state of Iowa to teach covering the same period of time, until such contract shall have been released, and such other matters as may be agreed upon, which may include employment for a term not exceeding the ensuing school year, except as otherwise authorized, and payment by the calendar or school month, * * *." (Emphasis supplied).
Moravek believes the emphasized phrase of the section expressly authorizes teachers and school districts to agree to methods other than those specified in later parts of the section for termination of their contractual relationship. He cites the following cases in support of this belief: Miner v. Lovilia Ind. Sch. Dist., 212 Iowa 973, 234 N.W. 817; Ashby v. School Township of Liberty, 250 Iowa 1201, 98 N.W.2d 848; and Barnett v. Durant Community School Dist., 249 N.W.2d 626 (Iowa 1977).
Moravek contends this court in Miner and Ashby upheld agreements between the teachers and the school districts which reduced the teachers' rights in the context of nonrenewal. He interprets Barnett as upholding an agreement which expanded teachers' rights. He maintains the grievance procedure here was an agreement to expand the rights of teachers in the context of nonrenewal and as such should be upheld in view of the holdings in Miner, Ashby and Barnett.
January 18, 1978, this court filed its opinion in Keith v. The Community School District of Wilton, 262 N.W.2d 249, another case dealing with termination of a teacher's contract. In the cited case a manual entitled "Policies and Procedures of the Board of Directors" which the board admitted was prepared and passed out with its knowledge *804 contained a section, Code 427, dealing with dismissal of teachers. Nevertheless, the trial court found section 279.13, The Code, 1973, was available to the board for termination proceedings.
On appeal Keith maintained this was error. He insisted that although section 279.13 was applicable, the only method by which the board could terminate Keith's contract was by following the provisions of Code 427 of the manual. In urging this contention Keith argued the phrase "and such other matters as may be agreed upon" in section 279.13 allowed teachers and school boards to agree to methods other than those specified in the later parts of that statute for termination of the contractual relationship. He relied on Miner, Ashby and Barnett in support of this position. In the course of its opinion in Keith this court dealt with the three cited cases. That discussion will not be repeated at this point.
The board did not refute Keith's expansion theory in its brief and argument but contended the provisions of the manual applied only when a principal instigated termination proceedings which was not the factual situation in Keith. Consequently, we did not reach Keith's specific contention section 279.13, The Code, 1973, allowed teachers and school boards to agree to methods other than those specified in that section for termination of contractual relationship.
The District on the other hand asserts "the instant situation is one where plaintiff contends not that there was a mutual agreement for termination but rather there was a mutual agreement for determining the means of termination." (Emphasis supplied). In this connection the District argues it cannot by contract implement a grievance procedure which would give the responsibility for making a final termination decision to an arbitrator and remove it from the school board in whom the legislature has conferred the authority. It contends any attempt by the District or a teacher to enter into a contract which would evade or avoid the teacher termination provision of section 279.13 of the Code as it then existed would be against public policy and therefore void. Stated otherwise, it is the District's position the master contract may not supersede legislative preemption of the field of teacher termination.
"* * * This proposition must be reduced to the single one that it is violative of, or inconsistent with, the statute. Unless it be so, it cannot be void as against public policy. If it now be deemed against public policy, it is only because it is violative of the statute." Miner v. Lovilia Ind. Sch. Dist., 212 Iowa at 977, 234 N.W. at 819.
The question at this point is whether the master contract between the District and the teachers' representative violates section 279.13 as it existed in 1975 insofar as the grievance procedure of the master contract purports to govern teacher contract termination.
Section 279.13 as it existed in 1975 provided that contracts with teachers should remain in force and effect for the period stated in the contract and thereafter automatically continued in force and effect for equivalent periods. The statute at that time permitted modification or termination of the contract by mutual agreement of the board of directors and the teacher as well as by resignation of the teacher or termination as provided in said section.
In Miner there was mutual assent to a contract which authorized the school board to terminate the teacher's contract for any reason by giving 30 days notice in writing of such intent to the teacher.
Ashby dealt with a mutual agreement between the board and the teacher that the contract would be terminated upon the occurrence of a specified conditiona decrease in enrollment of less than six students. By this agreement the teacher waived any right to be confronted with a formal charge as ground for a dismissal.
Barnett concerned the rights of the teacher and the board to include in the contract of employment reimbursement to the teacher for tuition expended on approved courses of graduate studies.
*805 In none of the cited cases was there an agreement which purported to give the responsibility for making a final termination decision to anyone other than the school board. In our opinion these decisions do not lend persuasive support for plaintiff's contention considered in this division.
It is true Miner and Ashby each contain the statement that the first paragraph of section 279.13 as then in force imposed no disability upon the contracting parties except that the term of service should not exceed the ensuing year. Subject to this single disability they say the right of contract as between the contracting parties was in no manner abridged. Quotations from each of these cases relative to this statement were set out in Barnett.
Nevertheless, we conclude these cases do not justify a determination that the phrase "and such other matters as may be agreed upon" would warrant extending to the contracting parties the right to mutually agree to abolish the board's exclusive power to renew, or not to renew, teachers' contracts. This is particularly true in light of the significant role given the District by the legislature in maintaining integrity and efficiency in school administration. See Norbeck v. Davenport Community Sch. Dist., 545 F.2d 63, 69 (8 Cir. 1976).
We therefore hold the master contract between the District and the teachers' representative insofar as the grievance procedure provided in the master contract purported to govern teacher contract termination violated section 279.13 as then in force and was against public policy.
IV. What is said in arriving at our determination in division III hereof compels the conclusion the contractual grievance procedure purported to be included in the master contract was not a valid method to resolve disputes over termination of a teacher's continuing contract.
The trial court was correct in sustaining the District's motion to dismiss plaintiff's petition for failure to state a claim upon which any relief could be granted.
The case is therefore
Affirmed.
