estate in the excess area are subject to the area connection charge if they connect, directly or indirectly, to the water main “to service the real estate situated in the excess area or adjacent to the excess area[.]” (App. 90; Appellee’s Addendum 4) (emphasis added). Thus, the language of Section 4.1, agreed upon by the parties, shows that the intent of the parties was that the area connection charge would be assessed against excess area owners in two specified situations. Because the trial court erroneously interpreted the contract as a matter of law, we reverse the trial court’s grant of Hunt-ertown’s partial summary judgment motion and denial of Carroll Creek’s cross-motion for summary judgment and remand for further proceedings. See, e.g., Bhd. Mut. Ins. Co., 971 N.E.2d at 132-33 (<HOLDING>). See also Singleton, 977 N.E.2d at 968
holding that at summary judgment hearing trial court erred by considering theory not raised in the pleadings holding that we are not at liberty to rewrite a contract and reversing a trial courts grant of summary judgment where the court erred in interpreting the contract holding that trial court may not grant summary judgment by default  when the movants summary judgment proof is legally insufficient recognizing the general rule which permits judicial notice of a courts prior cases to support a motion for summary judgment but reversing because in his order the trial judge made no specific reference to the basis for his grant of summary judgment holding that the trial court may not grant summary judgment on a ground not raised in the motion