William Kent Cummings and wife, Kimberly N. Cummings, (“defendants”) appeal from order entered granting Christian Emerson Dysart and wife, Mildred Maxwell Dysart’s (“plaintiffs”) motion for summary judgment. We affirm.
I. Background
On 26 August 2003, plaintiffs offered to purchase defendants’ home located at 2512 White Oak Road in Raleigh, North Carolina, pursuant to an Offer to Purchase and Contract (the “Contract”). The Contract recited a purchase price of $1,200,500.00 and an earnest money deposit of $10,500.00. The deposit was tendered by plaintiffs with the Contract and received by defendants and held in escrow. Defendants signed the Contract that day. The Contract included an attached document, titled “ADDITIONAL PROVISIONS ADDENDUM” (the “Cost of Repair Contingency”), which was signed simultaneously. The Addéndum states:
9. COST OF REPAIR CONTINGENCY: If a reasonable estimate of the total cost of repairs required by Paragraph 12(b) and Paragraph 12(c) of the Offer to Purchase and Contract equals or exceeds $10,000.00, then Buyer shall have the option to terminate this Contract and all earnest monies shall be returned to Buyer.
*643IN THE EVENT OF A CONFLICT BETWEEN THIS ADDENDUM AND THE OFFER TO PURCHASE AND CONTRACT, THIS ADDENDUM SHALL CONTROL.
Paragraph 12(b) and Paragraph 12(c) of the contract state:
12. (b) Property Inspections: Unless otherwise stated herein, Buyer shall have the option of inspecting, or obtaining at Buyers expense inspections, to determine the condition of the Property. Unless otherwise stated herein, it is a condition of this contract that (i) the built-in appliances, electrical system, plumbing system, heating and cooling systems, roof coverings (including flashing and gutters), doors and windows, exterior surfaces, structural components (including foundations, columns, chimneys, floors, walls, ceilings, and roofs), porches and decks, fireplaces and hues, crawl space and attic ventilation systems (if any), water and sewer systems (public and private), shall be performing the function for which intended and shall not be in need of immediate repair; (ii) there shall be no unusual drainage conditions or evidence of excessive moisture adversely affecting the structure (s) and (iii) there shall be no friable asbestos or existing environmental contamination. Any inspections shall be completed and written notice of necessary repairs shall be given to Seller on or before 14 davs after acceptance. Seller shall provide written notice to Buyer of Seller’s response within 5 days of Buyer’s notice. Buyer is advised to have any inspections made prior to incurring expenses for Closing and in sufficient time to permit any required repairs to be completed bv Closing.
[12.](c) Wood-Destroying Insects: Unless otherwise stated herein, Buyer shall have the option of obtaining, at Buyer’s expense, a report from a licensed pest control operator on a standard form in accordance with the regulations of the North Carolina Structural Pest Control Committee, stating that as to all structures except N/A. there was no visible evidence of wood-destroying insects and containing no indication of visible damage therefrom. The report must be obtained in sufficient time so as to permit treatment, if any, and repairs, if any, to be completed prior to Closing. All treatment required shall be paid for by Seller and completed prior to Closing, unless otherwise agreed upon in writing by the parties. The Buyer is advised that the inspection report described in this paragraph mav not always reveal either structural damage or damage caused bv agents or organisms other *644than wood-destroving insects. If new construction, Seller shall provide a standard warranty of termite soil treatment.
The Contract also stated, “[i]n the event: (1) this offer is not accepted; or (2) any of the conditions hereto are not satisfied, then all earnest monies shall be returned to Buyer . ..
On 8 September 2003, Philip W. McLean, Sr. (“McLean”), a licensed North Carolina home inspector, conducted a home inspection for plaintiffs. McLean’s inspection reported a “[significant settlement crack at the left front corner, (the crack appears to start at the bottom and run up through and to the 2nd floor), (b) A crack in the stucco (left rear.of garage wall). Further evaluation is warranted.” McLean’s affidavit stated his “report was made available to Plaintiffs on September 9, 2003.”
•Also on 8 September 2003, Mitchell Fluhrer (“Fluhrer”), a structural engineer, inspected the house. His evaluation noted structural defects to the house. Fluhrer stated in his affidavit that “in [his] professional opinion [he] would expect that this repair would well exceed more than $10,000.” Fluhrer provided two separate letters dated 10 September 2003 and 11 September 2003 to plaintiff Christian Dysart that stated his findings.
Plaintiff Mildred Maxwell Dysart stated in her deposition that “[l]ater in the day of September 9, 2003, we instructed our realtor to terminate the contract pursuant to paragraph 9 of the Additional Provisions Addendum to the Offer to Purchase and Contract.... Our realtor faxed a notice of termination of the contract to the seller’s realtor that same day.”
On 9 September 2003, defendants’ real estate agent, Mary Edna Williams (“Williams”), received a facsimile by telecopy from plaintiffs’ real estate agent, Bill Sewell (“Sewell”). This facsimile stated “Buyer had decided to terminate contract per additional provisions addendum #9.” The facsimile included the North Carolina Association of Realtors standard form “Termination of Contract and Release of Earnest Money” signed by plaintiffs on 9 September 2003 and a copy of the signed Additional Provisions Addendum.
On 10 or 11 September 2003, Steve Schmidt, a superintendent for McDonald-York, Inc., a commercial construction company located in Raleigh, North Carolina, evaluated the house. At that time, he had in his possession a letter written.by Fluhrer and McLean’s inspection report. During his inspection, he determined that “the left front cor*645ner of this house is leaning to the left 2.175 inches ... at the tope [sic] of the wall. As viewed by the left side this corner is leaning 0.365 inches to the right. This is indicative of a foundation failure at this corner.” Schmidt prepared a written estimate of the total cost of repair for $58,910.23.
On 11 or 12 September 2003, plaintiffs hand delivered and Williams, defendants’ broker, received a letter that delineated the reasons for termination and demanded return of the $10,500.00 earnest money held in escrow. Williams stated in her deposition that “[o]n or after September 9, 2003,1 received a home inspection report by Philip McLean, two reports from Fluhrer Reed with dates of September 10 and 11, 2003 and an estimate from MY Homes dated September 12, 2003, which documents were also faxed to Kent Cummings.” Williams stated, “[t]he house was taken off the market' when the Offer to Purchase and Agreement was signed by the Dysaxts and Cummings. The house was put back on the market on September 9, 2003 to take back-up offers.”
On 12 September 2003, plaintiffs delivered Schmidt’s estimate to Williams and again demanded the return of the $10,500.00 deposit held in escrow. Defendants refused to release and return the escrow deposit.
Defendants contacted Marty Graff (“Graff’), a licensed contractor, to evaluate McLean’s, Fluhrer’s, and Schmidt’s estimates. On 24 September 2003, Graff inspected the house and estimated the cost of repairs was less than $10,000.00. Graff stated in his affidavit he repaired the defects as listed in the home inspections report for $6,986.11. In August 2004, after the repairs were completed, the house appraised for $1,029,000.00. Defendants sold the house to another buyer for $1,020,000.00 on 10 August 2004.
On 10 May 2004, plaintiffs filed a complaint against defendants to recover the $10,500.00 earnest money held in escrow. Plaintiffs alleged breach of contract, conversion, unjust enrichment, and sought a declaratory judgment. On 11 October 2004, defendants answered, raised the affirmative defenses of waiver, estoppel, set-off, and counterclaimed for breach of contract and sought a declaratory judgment.
On 17 February 2006, plaintiffs moved for summary judgment. On 27 February 2006, the trial court conducted a hearing and the trial court entered summary judgment in favor of plaintiffs on 1 March 2006. Defendants appeal.
*646II.Issues
Defendants argue plaintiffs, not defendants, breached the Contract and summary judgment for plaintiffs is error.
III. Standard of Review
Summary judgment is proper if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that any party is entitled to a judgment as a matter of law. The party moving for summary judgment ultimately has the burden of establishing the lack of any triable issue of fact.
A defendant may show entitlement to summary judgment by (1) proving that an essential element of the plaintiff’s case is non-existent, or (2) showing through discovery that the plaintiff cannot produce evidence to support an essential element of his or her claim, or (3) showing that the plaintiff cannot surmount an affirmative defense. Summary judgment is not appropriate where matters of credibility and determining the weight of the evidence exist.
Once the party seeking summary judgment makes the required showing, the burden shifts to the nonmoving party to produce a forecast of evidence demonstrating specific facts, as opposed to allegations, showing that he can at least establish a prima facie case at trial. To hold otherwise . . . would be to allow plaintiffs to rest on their pleadings, effectively neutralizing the useful and efficient procedural tool of summary judgment.
Draughon v. Harnett Cty. Bd. of Educ., 158 N.C. App. 208, 212, 580 S.E.2d 732, 735 (2003) (internal citations and quotations omitted), aff’d per curiam, 358 N.C. 131, 591 S.E.2d 521 (2004). We review an order allowing summary judgment de novo. Summey v. Barker, 357 N.C. 492, 496, 586 S.E.2d 247, 249 (2003).
IV. Breach of Contract
“The right to contract is recognized as being within the protection of the Fifth and Fourteenth Amendments to the Constitution of the United States . . . and protected by state constitutions.” Alford v. Insurance Co., 248 N.C. 224, 227, 103 S.E.2d 8, 10-11 (1958). “Persons . . . have a right to make any contract not contrary to law or public policy.” Fulcher v. Nelson, 273 N.C. 221, 223, 159 S.E.2d 519, 521 (1968) (quoting 2 Strong, North Carolina Index 2d, Contracts § 1). *647“[W]hen parties are on equal footing, competent to contract, enter into an agreement on a lawful subject, and do so fairly and honorably, the law does not permit inquiry as to whether the contract was good or bad, whether it was wise or foolish.” Knutton v. Cofield, 273 N.C. 355, 363, 160 S.E.2d 29, 36 (1968).
“The heart of a contract is the intention of the parties, which is to be ascertained from the expressions used, the subject matter, the end in view, the purpose sought, and the situation of the parties at the time.” Electric Co. v. Insurance Co., 229 N.C. 518, 520, 50 S.E.2d 295, 297 (1948); see Lane v. Scarborough, 284 N.C. 407, 409-10, 200 S.E.2d 622, 624 (1973) (When a court is asked to interpret a contract, its primary purpose is to ascertain the intention of the parties.). “The intention of the parties is gleaned from the entire instrument and not from detached portions.” International Paper Co. v. Corporex Constructors, Inc., 96 N.C. App. 312, 316, 385 S.E.2d 553, 555 (1989).
“It is well settled that a contract is construed as a whole.” Id. “Individual clauses are to be considered in context.” Id. at 316, 385 S.E.2d at 555-56. “All parts of the contract will be given effect if possible.” Id. at 316, 385 S.E.2d at 556. “Where a contract confers on one party a discretionary power affecting the rights of the other, this discretion must be exercised in a reasonable manner based upon good faith and fair play.” Mezzanotte v. Freeland, 20 N.C. App. 11, 17, 200 S.E.2d 410, 414 (1973), cert. denied, 284 N.C. 616, 201 S.E.2d 689 (1974). A contract that is plain and unambiguous on its face will be interpreted by the court as a matter of law. Lane, 284 N.C. at 410, 200 S.E.2d at 624-25.
In Midulla v. Howard A. Cain, Inc., this Court affirmed summary judgment in favor of plaintiffs. 133 N.C. App. 306, 308-09, 515 S.E.2d 244, 246-47 (1999). The parties’ contract contained the same addendum that is before us here. Id. This Court held plaintiffs’ offer was contingent on a “[r]eview of covenants and restrictions, the body of which are satisfactory to Buyer.” Id. at 309, 515 S.E.2d at 246. Pursuant to the addendum to the contract, “plaintiffs had the discretion to cancel the Contract if they were not satisfied with the covenants and restrictions governing the area where the property was located.” Id.
This Court affirmed summary judgment for plaintiffs and held:
[t]he Contract gave plaintiffs the discretionary power to cancel the Contract if they were not satisfied with the covenants and *648restrictions. The record reflects that plaintiffs believed that “the covenants and restrictions exposed them to the risk of becoming obligated for payments in which they had an inadequate voice in approving.” Under the terms of the Contract, this would be an adequate reason to cancel the Contract.
Id. at 309-10, 515 S.E.2d at 247.
As stated above, the Addendum to the Contract included a “Cost of Repair Contingency” clause, which states:
9. COST OF REPAIR CONTINGENCY: If a reasonable estimate of the total cost of repairs required by Paragraph 12(b) and Paragraph 12(c) of the Offer to Purchase and Contract equals or exceeds $10,000.00, then Buyer shall have the option to terminate this Contract and all earnest monies shall be returned to Buyer.
IN THE EVENT OF A CONFLICT BETWEEN THIS ADDENDUM AND THE OFFER TO PURCHASE AND CONTRACT, THIS ADDENDUM SHALL CONTROL.
(Emphasis supplied).
On 8 or 9 September 2003, plaintiffs obtained an estimate from McLean, a licensed North Carolina home inspector, and Fluhrer, a structural engineer, that the estimated total cost of repairs exceeded $10,000.00. On 9 September 2003, plaintiffs faxed, and defendants received, a North Carolina Association of Realtors standard form “Termination of Contract and Release of Earnest Money” signed by plaintiffs. The form’s cover sheet stated “Buyer had decided to terminate contract per additional provisions addendum #9.” On 9 September 2003, defendants placed their house back on the market to accept back-up offers.
The Cost of Repair Contingency gave plaintiffs the 'discretionary power to terminate the contract. See Midulla, 133 N.C. App. at 307, 515 S.E.2d at 245 (The buyer’s contract to purchase was contingent upon a “review of covenants and restrictions, the body of which are satisfactory to Buyer.”); see also Mezzanotte, 20 N.C. App. at 13, 200 S.E.2d at 412 (The buyer’s contract to purchase was contingent upon the buyer’s ability “to secure a second mortgage from North Carolina National Bank on such terms and conditions as are satisfactory to them in order to finance the closing and to secure additional working capital.”).
*649Plaintiffs also acted in a reasonable manner and in good faith and fair play when they promptly arranged and received a home inspection within the fourteen-day time frame stated in paragraph 12(b), even though the fourteen-day time period was not explicitly stated in the Cost of Repair Contingency Addendum.
Both McLean, a licensed home inspector, and Fluhrer, a structural engineer, notified plaintiffs within the fourteen-day period that structural problems existed with the house, and estimated repairs would exceed $10,000.00. Plaintiffs notified Sewell, their broker, within the fourteen-day period that they intended to terminate the Contract pursuant to the Cost of Repair Contingency. Sewell notified Williams, defendants’ broker, within the fourteen-day period through telecopy that “Buyer had decided to terminate contract per additional-provisions addendum #9.” Williams stated in her affidavit that “[t]he house was put back on the market on September 9, 2003 to take back-up offers.”
Plaintiffs promptly and properly exercised their discretionary right to cancel the contract after determining the estimated cost of repairs within fourteen days, although they were not explicitly required to do so under the Addendum. Plaintiffs promptly notified Sewell, who notified Williams of plaintiffs’ intent to terminate the Contract pursuant to the Cost of Repair Contingency. Plaintiffs promptly and properly terminated the Contract, which defendants acknowledged by placing the house back on the market for sale within fourteen days of the Contract. Plaintiffs are entitled to the return of their earnest money deposited with defendants. This assignment of error is overruled.
V. Conclusion
The contract was properly interpreted by the trial court as a matter of law. Lane, 284 N.C. at 410, 200 S.E.2d at 624-25. The trial court did not err by granting summary judgment in favor of plaintiffs and properly ordering the $10,500.00 earnest money deposit to be returned to plaintiffs. The trial court’s order is affirmed.
Affirmed.
Judge STEPHENS concurs. Judge STROUD dissents by separate opinion.