
13 A.3d 224 (2010)
BIRCH BROADCASTING, INC. and another
v.
CAPITOL BROADCASTING CORPORATION, INC. and another.
No. 2009-919.
Supreme Court of New Hampshire.
Argued: October 14, 2010.
Opinion Issued: November 24, 2010.
*226 Nelson, Kinder, Mosseau & Saturley, P.C., of Manchester (Mark D. Attorri on the brief and orally), and Patton Boggs LLP, of Washington, D.C. (Stephen Díaz Gavin and Kristen M. Jarvis Johnson on the brief), for the plaintiffs.
Whittington Law Associates, PLLC, of Hanover (W.E. Whittington on the brief and orally), for the defendants.
DALIANIS, J.
Following a bench trial in Superior Court (McNamara, J.), the defendants, *227 Capitol Broadcasting Corporation, Inc. (Capitol Broadcasting), Concord Broadcasting, LLC (Concord Broadcasting) and Vox Radio Group, LP (Vox Radio), appeal the trial court's order requiring them to specifically perform their contract with the plaintiffs, Birch Broadcasting, Inc. (Birch Broadcasting) and Nassau Broadcasting I, LLC (Nassau I) for the sale of a radio station in Concord. We affirm.

I. Background
The following facts were either found by the trial court or derive from the record submitted on appeal. This appeal concerns a February 9, 2004 stock purchase agreement among Capitol Broadcasting, Concord Broadcasting and Nassau Broadcasting Holdings, Inc. (Nassau Holdings). Capitol Broadcasting holds a license from the FCC to own and operate radio station WHHK-FM in Concord.
Capitol Broadcasting, Concord Broadcasting and Vox Radio are all related companies. Capitol Broadcasting is a wholly-owned subsidiary of Vox Radio; Concord Broadcasting is Capitol Broadcasting's sole shareholder; and, Vox Radio is the sole managing member of Concord Broadcasting.
Under the agreement, Nassau Holdings agreed to purchase all of Capitol Broadcasting's stock for $1 million. The agreement called for the license to operate the Concord radio station to be transferred from Capitol Broadcasting to Nassau Holdings. This transfer required approval from the Federal Communications Commission (FCC). The agreement provided that if approval did not become final within one year after the parties applied to the FCC for it, the parties had the right to terminate the agreement.
On July 16, 2004, the stock purchase agreement was amended to extend the time for obtaining FCC approval. The amended agreement provided, in pertinent part: "If the Closing has not occurred within five (5) years from the date hereof, the Stock Agreement shall automatically terminate without the need for action on the part of any party, and Seller shall be entitled to keep any amounts paid to it to the date of termination."
The agreement was again amended on September 30, 2004, when the defendants were paid $950,000 of the $1 million purchase price. In the second amended agreement, Nassau Holdings assigned its rights to Nassau I. On February 26, 2009, Nassau I signed an assignment and assumption agreement under which it assigned its rights to Birch Broadcasting.
Over the next several months, the parties worked cooperatively to obtain FCC approval to transfer control of the radio station from Concord Broadcasting to Birch Broadcasting. The FCC ultimately approved the transfer on June 19, 2009. On July 1, 2009, however, counsel for Capitol Broadcasting and Concord Broadcasting advised plaintiffs' counsel that Capitol Broadcasting and Concord Broadcasting refused to close on the transaction. He also advised that he believed that the stock purchase agreement had expired in February 2009.
The plaintiffs filed the instant petition on July 16, 2009, seeking specific performance and other relief. The trial court held a bench trial on an expedited basis in December 2009 and found that the defendants breached their agreement with the plaintiffs and breached the agreement's implied covenant of good faith and fair dealing by refusing to close on the transaction. The trial court ordered the defendants to specifically perform the agreement within a reasonable period of time. This appeal followed.


*228 II. Analysis

The defendants contend that the trial court erred when it: (1) found that they breached the parties' agreement; (2) found that they breached the implied covenant of good faith and fair dealing; (3) denied their motions to dismiss Vox Radio and Nassau I from the case; (4) declined to defer its decision pending the conclusion of proceedings then currently before the FCC; and (5) failed to rule specifically upon each of their requests for findings of fact and rulings of law. We address each argument in turn.

A. Breach of Contract Claim
The defendants first argue that their refusal to close on the transaction in July 2009 did not breach the parties' agreement because, by then, the agreement had expired by its own terms. Under the defendants' interpretation, the parties' agreement expired in February 2009five years from the date the parties executed their original agreement.
Resolving this issue requires that we interpret the parties' agreements. The interpretation of a contract, including whether a contract term is ambiguous, is ultimately a question of law for this court to decide. Behrens v. S.P. Constr. Co., 153 N.H. 498, 500, 904 A.2d 676 (2006). Accordingly, we review a trial court's interpretation of a contract de novo. Id.
When interpreting a written agreement, we give the language used by the parties its reasonable meaning, considering the circumstances and the context in which the agreement was negotiated, and reading the document as a whole. Id. at 503, 904 A.2d 676. We give an agreement the meaning intended by the parties when they wrote it. Id. "Absent ambiguity, however, the parties' intent will be determined from the plain meaning of the language used in the contract." Ryan James Realty v. Villages at Chester Condo. Assoc., 153 N.H. 194, 197, 893 A.2d 661 (2006) (quotation omitted).
"The language of a contract is ambiguous if the parties to the contract could reasonably disagree as to the meaning of that language." In the Matter of Taber-McCarthy & McCarthy, 160 N.H. 112, 115, 993 A.2d 240 (2010) (quotation omitted). If the agreement's language is ambiguous, it must be determined, under an objective standard, what the parties, as reasonable people, mutually understood the ambiguous language to mean. Id. In applying this standard, a court should examine the contract as a whole, the circumstances surrounding execution and the object intended by the agreement, while keeping in mind the goal of giving effect to the intentions of the parties. Id. at 115-16, 993 A.2d 240. Although the intentions of the parties at the time of the contract's formation are determinative, those intentions may be inferred from the situation of the parties and their actions after the contract was executed. See White v. Ford, 124 N.H. 452, 455, 471 A.2d 1176 (1984); see also Auclair v. Bancroft, 121 N.H. 393, 395, 430 A.2d 169 (1981) ("In determining the parties' intention, the court may properly consider their actions after the contract was executed."); Spectrum Enterprises, Inc. v. Helm Corp., 114 N.H. 773, 776, 329 A.2d 144 (1974) ("In this State how the parties acted with regard to the contract is considered as part of the relevant circumstances."). Applying an objective standard to determine what the parties, as reasonable people, mutually understood the ambiguous language to mean necessarily involves factual findings by the trial court to which we will defer if they are supported by the evidence and are not legally erroneous. See N.A.P.P *229 Realty Trust v. CC Enterprises, 147 N.H. 137, 141, 784 A.2d 1166 (2001).
Here, the parties dispute the meaning of section 9.1 of their agreement, as amended on July 16, 2004, which read:

Closing. The Closing shall be held within seven (7) days of the FCC's consent becoming a final order . . . at 10AM (Eastern Standard Time) (the "Closing") by exchange of documents by overnight carrier or facsimile, or such other date as shall be mutually agreed to by the parties, contingent on satisfaction of all conditions precedent to the parties' obligations to close (the "Closing Date"). If the Closing has not occurred within five (5) years from the date hereof, the Stock Agreement shall automatically terminate without the need for action on the part of any party, and Seller shall be entitled to keep any amounts paid to it to the date of termination.
The parties differ as to the meaning of these terms. The defendants argue that the "only possible reading of the term five (5) years from the date hereof is that `date hereof' refers to the date of the [stock purchase agreement] itself, i.e., February 9, 2004, not the date of the 1st Amendment." (Emphases omitted.) The plaintiffs counter that, while "[t]he word `hereof' obviously refers to the contract," it is impossible to tell from the language alone to which contract the parties intended to refer. As the plaintiffs explain, when the parties executed the first amended agreement, the stock purchase agreement "was no longer a single, stand-alone document; it now consisted of two documentsthe one signed on February 9, 2004, and the one signed on July 16, 2004. . . . [T]here is no way to tell from the language alone which date was intended; either date is possible." It is equally possible, the plaintiffs assert, to interpret the phrase "date hereof" to refer to the date of the second amended agreement (September 30, 2004), because that was the date the parties actually began performing on the agreement. We believe that the respective interpretations assigned to the disputed language are reasonable. We conclude, therefore, that the language is ambiguous.
The trial court found that the parties' subsequent cooperative conduct in continuing to seek FCC approval after February 2009 demonstrated that they intended the phrase "date hereof" to refer to the July 16, 2004 first amended agreement, and not to the date of the parties' original February 9, 2004 agreement. As these findings are supported by the evidence and are not legally erroneous, we uphold them. See id. Accordingly, we hold that the trial court did not err when it found that the defendants breached the parties' agreement by refusing to close on the transaction in early July 2009. Because we affirm the trial court's determination that the disputed language was ambiguous and its finding as to the meaning of the language, we need not address the parties' arguments regarding the trial court's alternative finding of waiver.

B. Implied Covenant of Good Faith and Fair Dealing Claim
The defendants next assert that the trial court erred when it found that they breached the implied covenant of good faith and fair dealing. In every agreement, there is an implied covenant that the parties will act in good faith and fairly with one another. Livingston v. 18 Mile Point Drive, 158 N.H. 619, 624, 972 A.2d 1001 (2009). In New Hampshire, there is not merely one rule of implied good-faith duty, but a series of doctrines, each of which serves a different function. Id. The various implied good-faith obligations fall into three general categories: (1) contract formation; (2) termination of *230 at-will employment agreements; and (3) limitation of discretion in contractual performance. Id. This case involves the third category. While the third category is comparatively narrow, its broader function is to prohibit behavior inconsistent with the parties' agreed-upon common purpose and justified expectations as well as "with common standards of decency, fairness and reasonableness." Id. (quotation omitted). We will uphold a trial court's determination regarding the breach of the implied covenant of good faith and fair dealing unless it is not supported by the evidence or is legally erroneous. Id.
The record supports the trial court's finding that the parties' agreed-upon common purpose and justified expectations included the expectation that their agreement would not expire before July 16, 2009. As discussed above, the record supports the trial court's finding that the parties mutually understood that the contract would expire by its own terms five years after they executed the July 16, 2004 first amended agreement.
The record also supports the trial court's finding that the defendants behaved inconsistently with this expectation and, therefore, breached the implied covenant of good faith and fair dealing, when they abandoned their obligations to close on the contract. The record supports the trial court's finding that the defendants worked cooperatively with the plaintiffs for many months to bring the transaction to a close by July 16 and that, at the last minute, even though FCC approval had been obtained, they refused to close on the contract, thereby disrupting the plaintiffs' justified expectations and depriving them of the benefit of the parties' bargain. Because we conclude that the evidence supports the trial court's finding that the defendants breached the implied covenant of good faith and fair dealing and that this finding is not legally erroneous, we uphold it. Id.

C. Motion to Dismiss Nassau I and Vox Radio
The defendants next contend that the trial court erred when it denied their motions to dismiss Nassau I and Vox Radio for lack of standing. "Generally, in ruling upon a motion to dismiss, the trial court must determine whether the allegations contained in the plaintiff's pleading sufficiently establish a basis upon which relief may be granted." Baer v. New Hampshire Dep't of Educ., 160 N.H. 727, 729, 8 A.3d 48 (2010) (quotation omitted). "When the motion to dismiss does not challenge the sufficiency of the plaintiff's legal claim but, instead, raises certain defenses, the trial court must look beyond the plaintiff's unsubstantiated allegations and determine, based on the facts, whether the plaintiff has sufficiently demonstrated his right to claim relief." Id. at 729, 8 A.3d 48 (quotation and brackets omitted). A jurisdictional challenge based upon lack of standing is one such defense. Id. We will uphold a trial court's ruling in such a case unless its decision is not supported by the evidence or is legally erroneous. See Atwater v. Town of Plainfield, 160 N.H. 503, 507, 8 A.3d 159 (2010).
"In evaluating whether a party has standing to sue, we focus on whether the party suffered a legal injury against which the law was designed to protect." Libertarian Party of N.H. v. Sec'y of State, 158 N.H. 194, 195, 965 A.2d 1078 (2008) (quotation omitted). The requirement that a party demonstrate harm to maintain a legal challenge rests upon the constitutional principle that the judicial power ordinarily does not include the power to issue advisory opinions. Id. at 195-96, 965 A.2d 1078.


*231 1. Nassau I

The trial court denied the defendants' motion to dismiss Nassau I because it found that Nassau I had direct standing to sue under the second amended stock purchase agreement. The defendants argue that this is insufficient to grant Nassau I standing because, in February 2009, Nassau I assigned all of its rights under the second amended stock purchase agreement to Birch Broadcasting and retained no rights for itself. To the contrary, as the plaintiffs aptly note, the February 2009 assignment and assumption agreement provides that, upon closing of the transaction, Birch Broadcasting will assume a portion of the debt that Nassau I undertook to finance its $950,000 payment to the defendants. The agreement also gives Nassau I the right to purchase the station back from Birch Broadcasting if, at any time, Nassau I is permitted to own an additional radio station in the same market. Based upon these provisions, the trial court could have reasonably determined that the defendants' refusal to close on the transaction caused harm to Nassau I by denying it these contractual benefits. Therefore, the trial court did not err by denying the defendants' motion to dismiss Nassau I for lack of standing. In their reply brief, the defendants contend that Nassau I's interest in the stock purchase agreement is too attenuated to grant Nassau I standing to proceed in this case. We hold that the trial court reasonably concluded to the contrary.

2. Vox Radio
The trial court denied the defendants' motion to dismiss Vox Radio on the grounds that Vox Radio was a direct signatory to the first amended stock purchase agreement and that one of the signatories to the application for FCC approval signed on behalf of Vox Radio. Contrary to the defendants' assertions, these findings are supported by the evidence, and we uphold them.

D. Deferring Decision Until FCC Proceedings Completed
The defendants next argue that the trial court erred by refusing to defer its decision until certain FCC proceedings had concluded. Specifically, they contend that the trial court should have deferred its decision until the FCC had had an opportunity to rule upon whether the Nassau companies have an impermissible ownership interest in Birch Broadcasting, which is contrary to FCC rules. The trial court denied the request on the ground that to delay its decision would be inequitable given that the defendants had not shown why they failed to bring their FCC complaint earlier. We can discern no error in this ruling.

E. Ruling upon Defendants' Specific Requests
Finally, the defendants assert that the trial court erred when it declined to rule specifically upon its individual requests for findings of fact and rulings of law. RSA 491:15 (2010) provides: "The court . . . shall, if either party requests it, give his decision in writing, stating the facts found and his rulings of law, which shall be filed and recorded." In interpreting RSA 491:15, we have held that although a superior court justice sitting without a jury is generally under no obligation to make findings and rulings in support of a decree unless a party asks for them, when either party does request them, RSA 491:15 requires a statement of facts and legal rulings in jury-waived and non-jury cases. Harrington v. Town of Warner, 152 N.H. 74, 85, 872 A.2d 990 (2005). The trial judge in such a case need not respond to every request filed by a *232 party, but the court is obligated to make findings of the basic or essential facts that are sufficient to support the ultimate decision. Id. This may be done in the narrative form, and the essential rulings of law may be likewise explained. Id. The object is to allow an opportunity for adequate review in this court by providing us with the actual basis for the trial court's decision, in terms of facts found and law applied. M.A. Crowley Trucking v. Moyers, 140 N.H. 190, 195, 665 A.2d 1077 (1995).
Here, the trial court's order sets forth both sufficient findings of fact and essential rulings of law to support its ultimate decision. See Harrington, 152 N.H. at 86, 872 A.2d 990. Although the trial court did not rule upon the defendants' proposed findings and rulings, "the trial judge need not respond expressly to every specific request filed by a party." Id. (quotation and ellipsis omitted). Accordingly, the trial court did not fail to provide an adequate basis for appellate review of its decision. See id.
Affirmed.
DUGGAN, HICKS and CONBOY, JJ., concurred.
