#### Herman J. KUEHNE and Esther J. Kuehne, Appellants (Plaintiffs), v. SAMEDAN OIL CORPORATION, Samedan Associates, Inc., Jack C. Vaughn, R. D. Poindexter, Albert Sklar, Curtis E. Calder, Jr., Leonard W. Phillips, Atlantic Richfield Company, Union Oil Company of California, Grady H. Vaughn, III, Jack C. Vaughn, Trustee, E. H. Gunter, Trustee, Mary Jo Vaughn, Trustee, John S. Nichols, Trustee, Davis Oil Company, Sinclair Oil and Gas Company, Marathon Oil Company, Paul Messinger and Company, Don Mettler, Raymond Chorney, Richard C. Boyd, Guy C. Burton and First National Bank of Casper, Appellees (Defendants).

No. 5428.

Supreme Court of Wyoming.

April 17, 1981.

*1036Paul J. Drew, Lubnau & Drew, Gillette (argued), for appellants (plaintiffs).

W. Thomas Sullins, II, Brown, Drew, Apostólos, Massey & Sullivan, Casper (argued), for appellees (defendants).

Before ROSE, C. J., and RAPER, THOMAS, ROONEY and BROWN *, JJ.

*

 District Judge at time of oral argument when assigned upon recusal of McCLINTOCK, J., now retired. Justice of this court effective March 26, 1981.

RAPER, Justice.

Appellants brought an action against ap-pellees for cancellation of an oil and gas lease as it applied to a portion of the lands included in the leasehold. They alleged that the interest holders failed to comply with implied covenants for further exploration and reasonable development. Appel-lees moved for summary judgment. The motion was granted, the district judge finding there was no issue of material fact and that appellees were entitled to judgment as a matter of law, and judgment was rendered forthwith pursuant to Rule 56, W.R. C.P.

On appeal appellants present as questions:

> “Whether the district court erred in granting summary judgment for appel-lees because there is a genuine issue of material fact whether the appellees have breached the implied covenants of the lease of reasonable development and further exploration.

> “Whether the district court erred in granting summary judgment against appellant[s] based on the relief sought in their complaint.”

> We will affirm.

I

On September 11, 1956, appellants entered into an oil and gas lease with The Ohio Oil Company1 covering 711.05 acres *1037more or less2 in Campbell County, Wyoming for a primary term of ten years. The lease appears on a standard producers printed form which was in common use at that time. While it contains some 15 numbered sections, the following provisions appear to be those pertinent to a disposition of this case:

> “2. This lease shall remain in force for a term of ten (10) years from this date and as long thereafter as oil or gas is [word blotted out] produced from said lands by the lessee. * * *

> ******

> “11. If lessee at any time should include all or any part of the lands covered by this lease in a unit for cooperative operating agreement, lessee shall have the right to include lessor’s royalty interest in said agreement and thereupon said agreement shall exclusively control the drilling, operating, and producing of such lands, anything to the contrary in this lease notwithstanding. The commencement and conduct of drilling operations on any part of the lands included in such agreement shall be deemed to comply with and satisfy all provisions of this lease relative to commencement and conduct of drilling operations. If oil, gas or other hydrocarbon is found in paying quantities on any of the tracts of land included in such agreement, whether or not on lands included in this lease, the royalty payments, provided by Section 3 hereof, shall be paid only upon the portion of such production which is allocated under said agreement to lands covered by this lease; and this lease shall remain in force as long as oil, gas or other hydrocarbon is [word blotted out] produced from such tracts, or any of them. Any agreement made by lessee under this paragraph shall be in writing, and lessee shall furnish lessor with a copy of the signed agreement.

> “12. This lease shall not be terminated, forfeited or cancelled for failure by lessee to perform in whole or in part any of its implied covenants, conditions, or stipulations until it shall have been first finally and judicially determined that such failure or default exists, and thereupon lessee shall be given a reasonable time thereafter to correct any default so determined, or at lessee’s election it may surrender the lease with option of reserving under the terms of this lease each producing well and ten (10) acres surrounding it as selected by lessee, together with the right of ingress and egress thereto. Lessee shall not be liable in damages for breach of any implied covenant or obligation.”

Production was obtained within the ten-year term upon a portion of the leasehold lands which later was included in what is known as the Kuehne Ranch Unit Agreement dated November 7, 1968. That portion of the leasehold lying outside the boundaries of the Kuehne Ranch Unit3 is described as follows:

> Township 51 North, Range 69 West, 6th P.M. Section 7: Lot 2, SE1/) NW1/), NE1/) SW1/), SV2 SW1/),

and is the subject of this litigation.

II

The relief which appellants have consistently not only prayed for in their complaint *1038but unvaryingly sought at all stages during the district court proceedings leading to and during the course of this appeal is that the lease be partially cancelled as to that part of the leased lands not included in the Kuehne Ranch Unit, or as they have stated it, that the “gas lease as it applies to the lands lying outside the Kuehne Ranch Unit *be cancelled** * (Emphasis added.) Their claim is based upon a theory that the leasehold owners have breached implied covenants of reasonable development and further exploration, in that a prudent operator would drill additional wells which would probably produce oil or gas in paying quantities. They further argue that even though wells have been drilled upon the land in question, exploration has been unreasonably insufficient.

Ill

Appellees, following a pretrial conference and order of the trial court setting the case for trial, filed a motion for summary judgment relying on the pleadings, an affidavit and the answers to interrogatories. The affidavit was that of the Division Manager of the appellee Samedan Oil Corporation. It told of the 1965 discovery wells on appellants’ lands and subsequent development of the Kuehne Unit. In addition, in 1972 upon demand by appellants, a well was drilled in the SEV4 SWV4 of Sec. 7, T.51N., R.69W., outside the Unit, which resulted in a dry hole. Other drilling in the vicinity of the lands sought to be released has resulted in dry holes.

Appellants filed opposing affidavits. One by Billie J. Alpine, a petroleum geologist, stated that he had reviewed and evaluated the electrical logs, electrical surveys, production records and drill stem tests of wells described in the Samedan affidavit. As a result, he was satisfied that the Kuehne Ranch Unit was draining oil from lands sought to be released from the lease. He further indicated that if the lands were released, he intended to drill oil wells on the SWV4 SW'/i and the NEl/4 SWV4 of Sec. 7, T.51N., R.69W., 6th P.M. and a greater production of petroleum would be recovered from the producing reservoirs.

Another affidavit produced by appellants showed there to be an agreement for an oil and gas lease between the appellants and Philip Freeman of the 193.44 acres covering those lands sought to be released from the lease now before the court. Of course this agreement by its terms was contingent upon the release being granted.

The parties submitted memoranda of law and orally argued the motion for summary judgment to the trial judge. At the close of argument, in sustaining the motion for summary judgment by appellees, the judge made the following statement:

> “THE COURT: From the terms of the oil and gas lease it’s the Court’s opinion that the remedy of the plaintiff would be to complain to the Court that their lands are being drained by reason that certain wells are not drilled on the lands in question for the Court to judicially determine that is the situation and also probably to determine what should be done to adequately drain the lands and then to give the lessee a time to do that. At least that’s the way I interpret Paragraph 12. It does seem to give the plaintiffs a remedy, but it doesn’t give them the remedy of asking that the lease be cancelled in the face of the other provision, particularly, Paragraph 11.”

We substantially agree with the analysis of the trial judge. With brevity he went directly to the heart of the problem but we must go through a more detailed exercise to reach the same result.

IV

First, we should summarize by way of a refresher some of the many applicable rules pertaining to summary judgment, though we do so many times. It is ordinarily a valuable judicial tool for prompt disposition of litigation, but in this case because of the stubbornness of appellants, it may have been a means of requiring them to initiate a different form of action to conform to the contract terms. An oil and gas lease is a contract and is construed under the doctrines applicable to contracts. *1039Everett, Wyoming Decisions Relative to the Law of Oil and Gas and Comments with Respect to Form “88” Leases, 6 Wyo.LJ. 223,224 (1951). In Everett’s able treatise on Form 88 Leases, as is that before us, he cites *Hammett Oil Co. v. Gypsy Oil Co.,*1921, 95 Okl. 235, 218 P. 501, 34 A.L.R. 275, where the court treated the lease as a contract in its disposition using contract construction rules. See also 2 Summers, The Law of Oil and Gas (1959), Ch. 12 covering construction of oil and gas leases, beginning at p. 484 where it is explained and the theme is that with some exceptions generally the usual rules of instrument and contract construction apply.

Whether a summary judgment is proper depends upon the correctness of the district court’s accuracy in finding that there is no genuine issue as to any material fact and that the appellees as prevailing parties are entitled to judgment as a matter of law. Weaver v. *Blue Cross-Blue Shield of Wyoming,*Wyo.1980, 609 P.2d 984. A material fact is one which, if proved, would have the effect of establishing or refuting one of the essential elements of the cause of action or defense asserted by the parties. *Shrum v. Zeltwanger,*Wyo.1977, 559 P.2d 1384. Of particular importance in this case is the definition of a material fact set out in *Johnson v. Soulis,*Wyo.1975, 542 P.2d 867, 871-872:

> “ * * * A material fact has been defined as one having some legal significance, that is, under the law applicable to a given case, it would control in some way the legal relations of the parties; as one upon which the outcome of litigation depends in whole or in part; as one on which the controversy may be determined; as one which will affect the result or outcome of the case depending upon its resolution; and one which constitutes a part of the plaintiff’s cause of action or of the defendant’s defense. A fair summary of these definitions is that for purposes of ruling upon a motion for summary judgment a fact is material if proof of that fact would have the effect of establishing or refuting one of the essential elements of a cause of action or defense asserted by the parties. Such a fact would necessarily affect the application of the appropriate principle of law to the rights and obligations of the parties. In considering a motion for summary judgment it is appropriate for a court to identify the essential elements of the plaintiff’s cause or of the defense asserted, and to then determine the materiality of any fact in the light of whether it will establish or refute one of those essential elements. If it does not have that effect, it would not be a material fact in the controversy, and a genuine issue with respect to that fact, no matter how sharp, would not foreclose the granting of a motion for summary judgment.” (Footnotes omitted.)

The effect of a motion for summary judgment is to pierce the formal obligations and reach the merits of the controversy. *Minnehoma Financial Co. v. Pauli,*Wyo.1977, 565 P.2d 835. Facts are not decided — we only determine if a real issue exists. *Knudson v. Hilzer,*Wyo.1976, 551 P.2d 680. An appellate court must make this determination upon the basis of the same material as that before the trial judge. *Shrum v. Zeltwanger,*supra. Summary judgment may be utilized and is appropriate in contract cases; and if the language of a contract is plain and unequivocal, that language is controlling and the construction of its provisions is for the court as a matter of law. *Wyoming Machinery Co. v. United States Fidelity and Guaranty Co.,*Wyo.1980, 614 P.2d 716.

V

Because the disposition of this case largely depends on the construction of the oil and gas lease, we will first examine its terms and then determine whether there is any genuine issue of fact to be tried in this action. We are convinced that its terms are clear and no construction is necessary. If the language of a contract is plain and unequivocal, that language is controlling and the interpretation of its provisions is for the court as a matter of law. The meaning of the instrument is to be deduced *1040only from its language if the terms are plain and unambiguous. *HoIIabaugh v. Kolbet,*Wyo.1980, 604 P.2d 1359, 1361, and the extensive authority there set out. We cannot see that the pertinent contract provisions can be read and understood in more ways than one or have any obscurity of meaning, or indefiniteness of expression, so as to bring them within the definition of ambiguity, set out in *HoIIabaugh.*It is not our function to rewrite a clear contract. *Wyoming Machinery Co. v. United States Fidelity and Guaranty Co.,*supra.

Section 2 of the lease provides for a term of ten years as long as oil and gas is produced from said lands following discovery and production during the ten-year period. Arguably if this provision stood alone, it could perhaps be construed to mean from every square inch of the lands; but we must consider the contract as a whole with each part being read in the light of all other parts. *Amoco Production Co. v. Stauffer Chemical Co. of Wyoming,*Wyo. 1980, 612 P.2d 463.

Section 11 of the contract could make it no more clear that commencement of drilling, unitization and production as applied respectively on *“any part of the land*covered by this lease” (emphasis added) or *“any part of the lands*included in such agreement” (emphasis added) or *“on any of the tracts*of land included in such agreement” (emphasis added) and “is produced from such tracts, *or any of them ”*(emphasis added) makes it abundantly clear that the express duties of the lessee under the lease were in compliance when carried out on any portion of the leased lands.

Section 12 recognizes that there may be implied covenants.4 We cannot make a holding that there were or were not implied covenants and what, if any, they were because the appellants refuse to permit consideration of any relief except partial cancellation of the lease as to those lands not within the Kuehne Ranch Unit in order that they may enter into a new lease with others. Additionally, it is contrary to our policy to decide appeals piecemeal. *Knudson v. Hilzer,*supra. Section 12 could not more clearly state that the only way to approach the problem of implied covenants is to seek a final judicial determination that there is a failure to perform or a default by lessee of some implied covenant and the lessee is afforded a reasonable time after that to correct any breach or default found to exist. There is no question that such a final judicial determination has not been made and if made that appellees have not been accorded a reasonable opportunity to correct the default. Until these conditions precedent have been met, there can be no termination, forfeiture or cancellation of the lease, and no genuine issue of material fact exists.

This action may seek to accomplish the first step of establishing an implied covenant of the sequence required but would deny and skip any right of appellees to correct within a reasonable time. There is just simply a failure of the appellants to conform to the contract requirements of Section 12 of the oil and gas lease and set out and show that they are entitled at this point to cancellation of the lease. It is the duty of courts to sustain the legality of contracts fairly entered into, if reasonably possible rather than to seek loopholes and technical legal grounds for defeating an intended purpose. *Tri-County Electric Association, Inc. v. City of Gillette,*Wyo.1978, 584 P.2d 995, 1006.

Affirmed.

1

. Now Marathon Oil Company, appellee, presently having an overriding royalty interest in the lease. Appellees Samedan Oil Corporation, R. D. Poindexter, Albert Sklar, Curtis E. Calder, *1037Jr., Leonard W. Phillips, Union Oil Company of California, Grady H. Vaughn, III, Mary Jo Vaughn, Trustee, and John S. Nichols, Trustee, are the owners of leasehold interests under the subject lease through mesne conveyances. Ap-pellees Raymond Chorney, Richard Boyd and Guy C. Burton, are the owners of overriding royalty interests under the lease. Some leasehold interest owners have released their interests to appellants and are not named as parties.

2

. As described in the lease: T.51N., R.69W., Sec. 7, Lots 2, 4, SE1/) NW1/), E‘/z SW1/), Section 19, Lot 3, SE‘A NW'/t, E'/z SW1/), ÑWT/T SE1/); T.51N., R.70W., Sec. 12, SE1/), Sec. 24, NE1/) SW1/), W'/2 SE1/., NE1/) SE1/).

3

. The Kuehne Ranch Unit also contains lands not included in the appellants’ lease made to Ohio Oil Company, now Marathon Oil Company.

4

. “ * * * An implied covenant is one which may reasonably be inferred from the whole agreement and the circumstances attending its execution. Implication when used in that sense is synonymous with intention. An express covenant upon a given subject, deliberately entered into without fraud or mutual mistake, excludes the possibility of an implied covenant of a different or contradictory nature. * * * ” *Brimmer v. Union Oil Co. of California,*10th Cir. 1936, 81 F.2d 437, 440.

ROONEY, Justice,

concurring.

I *agree*with that said in the majority opinion, but I wish to comment briefly upon appellants’ contention that the pertinent issue concerns an alleged violation of the implied covenant of reasonable development.

*1041Implied covenants are particularly germane to oil and gas leases. See 5 Kuntz, Oil and Gas, Ch. 54, et seq. (1978 Rev.); 2 Summers, Oil and Gas, § 391, et seq. (1959). But an implied covenant may be superseded by an inconsistent express provision in the lease agreement. *Brimmer v. Union Oil Co. of California,*81 F.2d 437 (10th Cir. 1936); *Adkins v. Adams,*152 F.2d 489 (7th Cir. 1945); *Swiss Oil Corporation*v, *Riggsby,*252 Ky. 374, 67 S.W.2d 30 (1934); *Linn v. Wehrle,*35 Ohio App. 107, 172 N.E. 288 (1928). The majority opinion adequately points out that § 11 of the lease agreement was express in setting forth the parties understanding concerning that which occurred in this case.

Under provisions similar to § 11 of the lease agreement, the habendum clause has been held to be satisfied as to all parts of the leased premises when, as here, only the part of the premises upon which the well is located is included in a unit. *Wells v. Continental Oil Company,*244 Miss. 509, 142 So.2d 215 (1962), and even when there was no well on the leased premises (part of which was unitized) but was located elsewhere in the unit. *Trawick v. Castleberry,*Okl., 275 P.2d 292 (1953); *Texaco, Inc. v. Lettermann,*Tex.Civ.App., 343 S.W.2d 726 (1961); *Brixey v. Union Oil Company of California,*(W.D., Ark.), 283 F.Supp. 353 (1968); *Buchanan v. Sinclair Oil & Gas Company,*218 F.2d 436 (5th Cir. 1955).