
444 N.W.2d 10 (1989)
AMERICAN FEDERATION OF STATE, COUNTY AND MUNICIPAL EMPLOYEES (AFSCME) LOCAL 1922, Plaintiff and Appellant.
v.
STATE of South Dakota, South Dakota Department of Transportation and Richard L. Howard, its Secretary, South Dakota Bureau of Personnel and Charles A. Anderson, its Commissioner, and South Dakota Career Service Commission, Defendants and Appellees.
No. 16354.
Supreme Court of South Dakota.
Argued March 22, 1989.
Decided July 5, 1989.
*11 Linda Lea M. Viken of Finch, Viken, Viken & Pechota, Rapid City, for plaintiff and appellant.
Camron Hoseck, Asst. Atty. Gen., Pierre, for defendants and appellees State of S.D., Dept. of Transp. and Howard.
Jeffrey P. Hallem, Asst. Atty. Gen., Pierre, for defendants and appellees State of S.D., Bureau of Personnel, Anderson and Career Service Com'n.
Ronald W. Banks of Banks, Johnson, Johnson, Colbath & Huffman, Rapid City, for defendants and appellees Dept. of Transportation and Howard; Roger A. Tellinghuisen, Atty. Gen., Pierre, on the brief.
DOBBERPUHL, Circuit Judge.
This appeal arises from an action brought by the American Federation of State, County and Municipal Employees, Local 1922 (union), against the State of South Dakota, the Department of Transportation (DOT), the Bureau of Personnel (BOP), and the Career Service Commission (CSC) (collectively, state). Union sought a declaratory judgment that state violated their collective bargaining agreement by imposing unilateral midstream changes on certain DOT employees. The circuit court held for state. We affirm.
Union has been the certified formal representative of certain engineering and maintenance employees of DOT since 1971. Union and DOT have entered into collective bargaining agreements in all but one year since 1972. The agreement in question was dated September 6, 1985. The agreement contained, among other things, provisions concerning wages, hours and conditions of employment for union members who were also Career Service employees.
After the September 6 agreement was entered into, and partially in response to Garcia v. San Antonio Metropolitan Transit Authority, 469 U.S. 528, 105 S.Ct. 1005, 83 L.Ed.2d 1016 (1985), CSC, over the objection of union and DOT, promulgated new personnel rules to bring the State of South Dakota into compliance with the Fair Labor Standards Act. 29 U.S.C.A. 201 et seq. On December 28, 1985, prior to the expiration of the agreement, DOT implemented the new CSC rules for all its employees including union's members. Certain provisions were in conflict with terms of the collective bargaining agreement.
On a stipulation of facts and a trial to the court which presented evidence of past practices, negotiations, and intent of the *12 parties, the circuit court ruled for state. Specifically, the court ruled: 1) it was the intent of the parties to allow midstream changes; 2) CSC did not infringe on contractual rights of the parties; 3) SDCL 3-6 and 3-6A govern SDCL 3-18; 4) there is a rational basis for treating state's employees differently than employees of local governmental units; and, 5) there was no impairment of the contract.
The crux of this case is whether CSC may impose midstream rule changes which affect terms of a collective bargaining agreement. The trial court ruled that under this contract, midstream changes may be effected. The issue can be dealt with in several different ways. First, does the contract itself, properly interpreted, allow such changes? Second, are there statutory restrictions which prohibit such changes? Third, are there constitutional bars to such changes?
The first aspect of this case deals with the proper interpretation of the contract and the proper rules of construction to apply to collective bargaining agreements. Union argues that the intent of the parties, determined by past history, practice and usage, as related to the pertinent clauses, is paramount to the written language. Simply because this is a collective bargaining agreement, union asserts, the ordinary rules of contract construction do not apply, and we must go beyond the four corners of the contract. For this proposition, union cites MEA/AFSCME Local 519 v. City of Sioux Falls, 423 N.W.2d 164 (S.D.1988). Union has misconstrued MEA/AFSCME.
In MEA/AFSCME, this court stated: "In interpreting collective bargaining agreements, it is often necessary to look beyond the four corners of the contract itself ..." MEA/AFSCME, citing, International Union v. White Motor Corp., 505 F.2d 1193, 1197 (8th Cir.1974). This court did not hold that the language of the collective bargaining agreement is meaningless. Nor did we hold that in each instance one leaves the written word aside to go beyond the four corners of the contract. Specifically, we did say that if the language is ambiguous, and does not speak to a subject it would normally be expected to, then the court may go beyond the four corners of the contract.
Other jurisdictions have recognized this rule. When a latent ambiguity in the terms or language of an agreement exists, extrinsic sources such as bargaining history and past practices may be considered. Where a contract is not clear on its face, extrinsic evidence may be admitted. Ozark Air Lines, Inc. v. Air Line Pilots Association, 744 F.2d 1347 (8th Cir.1984); International Union v. White Motor Corp., supra. Arizona Laborers Etc. v. Conquer Cartage Co., 753 F.2d 1512 (9th Cir.1985); N.L.R.B. v. Intern. Bro. of Elec. Wkrs. Local, 772 F.2d 571 (9th Cir.1985).
Further, the Montana Supreme Court has stated:
Except in the rather narrow field of suits to compel performance of arbitration agreements, we have found no federal authority "suggesting that the nebulous body of decisional law envisioned in [Textile Workers Union v.] Lincoln Mills [353 U.S. 448, 77 S.Ct. 912, 1 L.Ed.2d 972 (1957)] was to be formulated in derogation of the common law of contracts." Hence, we see no reason not to apply the same rules of construction in cases involving collective bargaining contracts as we apply in cases dealing with contract law generally. (citations omitted).
Massett v. Anaconda Company, 630 P.2d 736, 738 (Mont.1981).
Under both state and federal jurisdictions, the rule is identical. When a contract is clear and unambiguous and speaks to a subject it is expected to, there is no need to go beyond the four corners of the contract. Thus, we will look to the language of the contract[*] and consider union's argument.
*13 Union's position is that the laws and regulations of the United States and South Dakota, or any injunction issued by a court of competent jurisdiction may not supersede the contract until union has had time to negotiate whether they will accept that law or not. Union would have us interpret their contract to mean that they may accept or reject any statute or regulation of the United States or South Dakota or any injunctive relief of any court of competent jurisdiction.
Clause 23.01 is clear and unambiguous. It speaks to the subject before us. When any provision of the agreement is in contravention of laws or regulations, "such provision shall be superseded by the appropriate provisions of such law or regulation, so long as the same is in force and effect ..."
Clause 23.02 provides that if any provision "is so superseded or the enforcement of any provision is enjoined ... the parties will meet for the purpose of good faith negotiations concerning a substitute provision." It is especially clear from 23.02 that when a provision of the contract is superseded and while the superseding law, regulation or injunction is in effect, then the parties will meet for good faith negotiations. This clearly indicates the contemplation of changes in the governing law or regulations. The phrase "shall supersede" and "superseded" indicate that the governing law will take effect and replace the contravening provisions immediately.
Clause 3.04 is also clear, unambiguous and consistent with midstream changes. Clause 3.04 states: "Officials and employees are governed by existing or future laws and regulations of appropriate authorities... and by subsequently published department policies and regulations required by law or by regulations of appropriate authorities." CSC is an appropriate authority to promulgate regulations concerning all state employees. The regulations promulgated are future regulations under the agreement. The clause states that the employees "are governed" by such laws and regulations. The word "are" speaks in the present tense. This does not indicate that the officials and employees will be governed by the law at some future date if they choose to be so governed. The language of the agreement indicates that any statutory or regulatory change will become effective immediately. Any argument to the contrary would result in a usurpation of legislative authority. In other words, a contrary reading of the contract would give both sides the authority to accept or reject legislative enactments.
In its second issue, union argues that the bargaining rights of public employees are paramount and superior to every other provision of law including SDCL ch. 3-6 and ch. 3-6A and the regulations promulgated thereunder. Even if union merely argued that the specific regulations in question did not preempt the contract, the argument would be meritless. Under the contract, union cannot argue that the agreement is not subject to preemption when they have agreed that they "are governed" by the laws and regulations of South Dakota and the United States, and that contravening provisions of the contract "shall be superseded" by appropriate provisions of law or regulations.
Union cites this court to Wright v. Bd. of Educ. of City of East Orange, 99 N.J. 112, 491 A.2d 644, 647 (1985), for the argument that state law may set minimums above which union representatives may negotiate *14 because "the mere existence of a statute or regulation relating to a given term or condition of employment does not automatically preclude negotiations." Union has misconstrued the cited authority. The particular language cited refers to the situation where a statute, which does not speak in the imperative, offers a minimum and maximum range within which an employer and employee are free to negotiate.
The case is simply inapposite. First, this court has never adopted the rule set forth in Wright. Second, if we had, it would not apply. In the case at bar, the regulation in question speaks in the imperative. The regulation leaves no range within which the employer and employee may bargain. Thus, the regulation precluded any negotiations.
Union also contends that by promulgating the regulations in question, CSC unconstitutionally impaired the rights and obligations of the parties under the contract. There is no question that state employees, through legislative grace, have been granted certain rights. SDCL ch. 3-18. There is also no question that the legislature has restricted certain employee rights and actions. SDCL 3-18-9 and 3-18-10 prohibit state employees from striking. In this instance, the words of Mr. Justice Holmes are most apt: "One whose rights, such as they are, are subject to state restriction, cannot remove them from the power of the state by making a contract about them. The contract will carry with it the infirmity of the subject matter." Hudson County Water Company v. McCarter, 209 U.S. 349, 357, 28 S.Ct. 529, 531-32, 52 L.Ed. 828, 832 (1908). Union's rights were granted by the legislature and are subject to legislative action. Union may not, by contract, choose at its whim, which legislative action it will accept and which it will not.
Union asserts that particular regulations impaired the contract. Our first inquiry is whether there has been a substantial impairment of the contractual relationship. Allied Structural Steel Company v. Spannaus, 438 U.S. 234, 98 S.Ct. 2716, 57 L.Ed.2d 727 (1978). Within the contract union agreed to be governed by the laws and regulations of the United States and South Dakota. Union also agreed that those laws and regulations may supersede the contract. Hence, there has been no impairment of the contract, nonetheless a substantial impairment.
Further, when this court reviews the constitutionality of a law, it will be upheld unless it is clearly and unmistakably unconstitutional. State v. Big Head, 363 N.W.2d 556 (S.D.1985); State v. Morrison, 341 N.W.2d 635 (S.D.1983); State v. Crelly, 313 N.W.2d 455 (S.D.1981); Frawley Ranches Inc. v. Lasher, 270 N.W.2d 366 (S.D.1978); County of Tripp v. State, 264 N.W.2d 213 (S.D.1978). That law is presumed to be constitutional. Any challenge must rebut the presumption and prove beyond a reasonable doubt that the law is unconstitutional. State v. Big Head, supra; Independent Community Bankers Ass'n v. State, 346 N.W.2d 737 (S.D. 1984); Crowley v. State, 268 N.W.2d 616 (S.D.1978). Union has not shown that the regulations impaired the contract, and certainly have not shown an unconstitutional impairment. When union agreed to be governed by the future laws and regulations, those future laws and regulations cannot be an impairment. Union, therefore, has not met its burden.
Finally, union makes an equal protection argument that there is no rational basis for treating state employees differently than employees of local governments. In analyzing equal protection questions, this court uses a two-part test. First, the court examines whether the statute sets up arbitrary classifications among persons subject to it. Second, the court examines whether there is a rational relationship between the classification and some legitimate legislative purpose. City of Aberdeen v. Meidinger, 89 S.D. 412, 233 N.W.2d 331 (1975). The burden of proof rests upon an appellant to show that the classification is clearly unreasonable and essentially arbitrary. Crowley v. State, supra.
The circuit court concluded: "Because of different funding sources and employment *15 relationships, there is a rational basis for the application of SDCL ch. 3-6 and 3-6A and lawfully adopted applicable administrative rules to state employees and not local government employees. Such application does not violate equal protection clauses of the South Dakota or United States Constitutions." Separate funding availability and different employment relationships are a rational basis to treat the groups differently.
Union argues there is no rational basis to treat state and local government employees differently. If they cannot be treated differently, they must be treated the same. Under union's argument, there could be no difference in any benefit given to any governmental employee within South Dakota. If all employees of all governmental units in South Dakota had to be treated the same, then the least common denominator would become the rule. This is because some governmental units can afford only the barest of minimums. Further, if they all had to be treated the same, no group could bargain for anything extra. This would mean either there would be no unions, a position union would surely find untenable, or one all encompassing union covering all government employees. Again, in this case, the least common denominator would rule. It is not only rational to treat the groups differently, it is necessary.
We therefore hold that: the contract allowed midstream changes; the contract was subject to the regulations promulgated under SDCL ch. 3-6A; and there is no constitutional bar to midstream changes. We have considered the other issues and arguments raised by the union and find them to be without merit.
The circuit court is affirmed.
WUEST, C.J., and MORGAN and MILLER, JJ., concur.
SABERS, J., concurs in part and dissents in part.
DOBBERPUHL, Circuit Judge, for HENDERSON, J., disqualified.
SABERS, Justice (concurring in part and dissenting in part).
The majority opinion focuses so intently on the language of the contract that it loses sight of the contract as a whole and arrives at an illogical interpretation.
If the majority interpretation of the contract were correct, Union would have expended great time and energy negotiating the contract, only in the end to give State permission to unilaterally change any contract provision, whether required or not. Such an interpretation is nonsensical. Union would never intend to enter into such an agreement because, in effect, it would leave Union at the will of the State with no contract.
The majority interpretation gives the State unrestricted power to change the contract (as evident from the nature of the changes approved by the majority). As AFSCME correctly argues, the regulations at issue in this case were unnecessary because the Fair Labor Standards Act establishes only minimum requirements. CSC simply was not obligated to promulgate the regulations, thereby altering the essence of the contract.[*] Therefore, if State is free to make these discretionary changes without Union's acceptance or negotiation, then it is free to promulgate regulations altering any provision of the contract. Consequently, Union has no contract, a result they would never intend.
Although the court must look to the language of the contract, the contract must be read as a whole, taking into consideration "the bargaining history, the context in which the contract was negotiated, the interpretation of the contract by the parties, and the conduct of the parties bearing upon its meaning." International Brotherhood of Electrical Workers v. N.L.R.B., 788 F.2d 1412, 1414 (9th Cir.1986); see also Bednarik v. United Steelworkers of America, 634 F.Supp. 498, 501 (N.D.Ohio 1985) ("When a case turns on the interpretation of a collective bargaining agreement, *16 it may be appropriate to look beyond even the plainest contractual language to determine the intent of the parties."). The court should strive for a balanced, reasonable contract interpretation. See General Motors Corp. v. Erves, 399 Mich. 241, 249 N.W.2d 41 (1976). Here, a reasonable interpretation would allow State to unilaterally alter the contract only when necessary. See United States Trust Co. of New York v. New Jersey, 431 U.S. 1, 25, 97 S.Ct. 1505, 1519, 52 L.Ed.2d 92, 112 (1977) (Laws impairing a state's own financial obligations are constitutional only if they are "reasonable and necessary to serve an important public purpose.").
Contrary to the statement in the majority opinion, the crux of this case is not "whether CSC may impose midstream rule changes which affect terms of a collective bargaining agreement," but whether CSC may impose "unnecessary" changes. If the CSC rules are wrong or overreaching, or, as here, unnecessary, then they cannot be immediately superimposed on the negotiated agreement or contractthat is why they are subject to negotiation. Wright v. Board of Education of City of East Orange, 99 N.J. 112, 491 A.2d 644 (1985). Therefore, I concur to the extent that the midstream rule changes were necessary, but dissent to the extent the changes were unnecessary.
NOTES
[*]  The pertinent contract language is found at Clauses 3.04, 23.01 and 23.02. Clause 3.04 reads:

In the administration of all matters covered by this agreement, the officials and employees are governed by existing or future laws and regulations of appropriate authorities, including policies set forth in the Bureau of Personnel Manual; by published department policies and regulations in existence at the time this agreement was approved; and by subsequently published department policies and regulations required by law or by regulations of appropriate authorities.
Clause 23.01 reads:
If any provision of this agreement is in contravention of the laws or regulations of the United States or of the State of South Dakota, such provisions shall be superseded by the appropriate provisions of law or regulation, so long as the same is in force and effect, but all other provisions of this agreement shall continue in full force and effect.
Clause 23.02 reads:
If any provision of this agreement is so superseded or the enforcement of any provision is enjoined by a court of competent jurisdiction, the parties will meet for the purpose of good faith negotiations concerning a substitute provision.
[*]  See Sonoma County Organization of Public Employees v. County of Sonoma, 23 Cal.3d 296, 152 Cal.Rptr. 903, 591 P.2d 1 (1979) (Wages are frequently "the very heart of an employment contract.").
