Demoulas Super Markets, Inc. (DSM), is a closely held Massachusetts corporation whose stockholders’ dealings with each other,3’* **4 and with the corporation, have spawned decades of litigation, resulting in four earlier decisions of this court.5 In the present case, several minority “Class A” stockholders (sellers), whose offer to sell their shares to DSM was rejected, brought an action in the Superior Court seeking, inter aha, a declaration that, consistent with DSM’s articles of organization, the sellers would be “at liberty to dispose of [their shares] in any manner [they] may see fit.” DSM filed counterclaims seeking declarations that the sellers cannot, consistent with their fiduciary duties to DSM and their fellow stockholders, sell their shares to any buyer who would imperil DSM’s status as a Sub-chapter S corporation for tax purposes (S corporation),6 and that the sellers are obligated to reoffer their shares to the corporation before selling them to a third party on more favorable terms.7
*723On cross motions for judgment on the pleadings, a Superior Court judge declared that the sellers are not bound by fiduciary duty with respect to the disposition of their shares pursuant to the provisions of art. 5 of the articles of organization (art. 5). The judge declared also that, under the terms of art. 5, the sellers need not reoffer their shares to DSM before offering them to a third party on more favorable terms than those arrived at by arbitrators designated in accordance with art. 5.* ******8 We affirm the judgment.
Background and proceedings. The essential facts are undisputed. We set forth certain of those facts, drawn from the parties’ pleadings and the exhibits attached thereto. See Flomenbaum v. Commonwealth, 451 Mass. 740, 742 (2008) (in deciding motion for judgment on pleadings, well-pleaded factual allegations in adversary’s pleadings are assumed to be true). See also Schaer v. Brandeis Univ., 432 Mass. 474, 477 (2000) (in evaluating motion pursuant to Mass. R. Civ. P. 12 [b] [6], 365 Mass. 784 [1974], we not only consider allegations in complaint but also may take into account “matters of public record, orders, items appearing in the record of the case, and exhibits attached to the complaint”).
Art. 5 restricts DSM stockholders from freely transferring their stock.9 Pursuant to art. 5, a stockholder who seeks to convey *724shares in DSM is required to “notify the directors of his desire to sell... in writing, which notice shall contain the price and all other terms at which he is willing to sell.”
In June, 2010, pursuant to art. 5, the sellers notified DSM of their offer to sell the thirty-six per cent of DSM shares they hold and named one of two arbitrators to determine the value of DSM’s stock.10 At that point, pursuant to the terms of art. 5, DSM had thirty days within which to accept or reject the offer. DSM chose to reject the offer and, according to the provisions of art. 5, named a second arbitrator, while at the same time asserting that it had not waived its right to contest the validity of the sellers’ notice. At that point, the sellers filed a complaint for declaratory relief in the Superior Court, seeking a declaration that their notice was valid and that, if DSM’s directors declined to purchase their shares at the value reported by the arbitrators, the sellers would be free to dispose of the shares “in any manner [they] may see fit.”
DSM filed counterclaims contending that the sellers were nonetheless bound by their fiduciary obligations to DSM and could not dispose of their shares in a manner that would impair DSM’s favorable S corporation tax status. See 26 U.S.C. §§ 1361, 1362 (2006) (Subchapter S); note 6, supra. DSM maintained that, in 1986, DSM’s stockholders unanimously elected to adopt Subchapter S tax status under provisions of the Internal Revenue Code.11 DSM claimed that, because the *725corporation would lose this favorable tax status if any of its shares were transferred to a corporate entity, the sellers were constrained by their fiduciary duty to DSM from freely selling their stock. DSM’s counterclaims sought declarations that (1) a sale by the sellers to an entity that would defeat DSM’s S corporation tax status would constitute a breach of their fiduciary duty to DSM and to their fellow shareholders; and (2) if DSM did not purchase the shares, the sellers could not sell to a third party at a price less than the value reported by the arbitrators without first offering to sell the shares to DSM at the lower price.
The parties filed cross motions for judgment on the pleadings. In January, 2011, while the cross motions were under advisement, DSM filed a “notice of mootness” concerning many of the pending claims. DSM stated that the arbitration process set forth in art. 5, which was the subject of the initial dispute, had concluded, but that the claims regarding the corporation’s Sub-chapter S status and the sellers’ fiduciary duty remained for the court’s consideration. The sellers did not oppose DSM’s notice as to their claims against DSM but reserved the right to pursue their claims against the individual defendants.
The judge dismissed the claims against the individual defendants and issued a memorandum of decision and a declaration on the sellers’ obligations under art. 5 and on their fiduciary duty in regard to the Subchapter S issue. The judge declared:
“1. The plaintiffs are not bound by fiduciary duties with respect to their disposition of their shares in accordance with Article 5, even if the consequence of such disposition is that it causes DSM to lose its Subchapter S status. However, the plaintiffs must exercise their Article 5 rights in a manner that comports with the implied covenant of good faith and fair dealing.
“2. Article 5 does not require the plaintiffs to re-offer their shares to DSM before selling them to third parties on terms more favorable than those set by the designated arbitrators.”
DSM appealed, and we granted the sellers’ application for direct appellate review.
*726Discussion. 1. Standard of review. The purpose of declaratory judgment is to “remove, and to afford relief from, uncertainty and insecurity” before an impending controversy reaches the point of breach and litigation. G. L. c. 231 A, § 9. See School Comm. of Cambridge v. Superintendent of Schs. of Cambridge, 320 Mass. 516, 518 (1946). A court may rule on a motion for judgment on the pleadings seeking declarations of the parties’ rights if the answer admits all material allegations in the complaint such that there are no material issues of fact remaining to be determined. See Reporters’ Notes to Rule 12, Mass. Ann. Laws Court Rules, Rules of Civil Procedure, at 192 (LexisNexis 2012-2013); Citibank, N.A. v. Morgan Stanley & Co. Int'l, PLC, 724 F. Supp. 2d 407, 414 (S.D.N.Y. 2010), aff’d, U.S. Ct. App., Nos. ll-2592-CV(L) & 11-2806-CV(CON) (2d Cir. Oct. 25, 2012). We review de novo a judge’s order allowing a motion for judgment on the pleadings under Mass. R. Civ. P. 12 (c), 365 Mass. 754 (1974). Wheatley v. Massachusetts Insurers Insolvency Fund, 456 Mass. 594, 600 (2010).
2. Sellers’ fiduciary duty. Shareholders in a close corporation12 owe each other a fiduciary duty of the “utmost good faith and loyalty.” O’Brien v. Pearson, 449 Mass. 377, 383 (2007), quoting Donahue v. Rodd Electrotype Co. of New England, Inc., 367 Mass. 578, 593 (1975) (Donahue). The imposition of a higher duty than that imposed on stockholders in publicly traded corporations reflects both the lack of a ready market for close corporation shares and the reliance by close corporation shareholders on one another for the success of the enterprise. Donahue, supra at 587, 592-593. As we have recognized, the close corporate form “supplies an opportunity for the majority stockholders to oppress or disadvantage minority stockholders,” id. at 588, and vice versa. Id. at 593 n.17.
However, we have encouraged parties in close corporations to negotiate for rights, protections, and procedures that define the scope of their fiduciary duty in foreseeable situations. By way of example, when a close corporation reacquires shares from its directors or controlling shareholders, the duty of utmost *727good faith and loyalty requires that the corporation offer to each shareholder an equal opportunity to sell a ratable number of his shares to the corporation at the same price. Donahue, supra at 597-598. Nonetheless, “a close corporation may purchase shares from one stockholder without offering the others an equal opportunity if all other stockholders give advance consent to the stock purchase arrangements through acceptance of an appropriate provision in the articles of organization, the corporate bylaws . . . , or a stockholder’s agreement.” Id. at 598 n.24.
Agreements in a corporation’s articles of organization or bylaws are treated as contracts between the shareholders and the corporation. Chokel v. Genzyme Corp., 449 Mass. 272, 275 (2007) (Chokel), citing Jessie v. Boynton, 372 Mass. 293, 303 (1977). The existence of a contract “does not relieve stockholders of the high fiduciary duty owed to one another in all their mutual dealings,” but where the parties have defined in a contract the scope of their rights and duties in a particular area, good faith action in compliance with that agreement will not implicate a fiduciary duty. Blank v. Chelmsford Ob/Gyn, P.C., 420 Mass. 404, 408-409 (1995) (Blank) (no breach of fiduciary duty in freeze-out of minority shareholder in close corporation where contract allowed termination of his employment on six months’ notice without cause and required terminated employees to sell shares back to corporation). When the challenged action of a shareholder in a close corporation “falls entirely within the scope of a contract,” that action will give rise to a claim under the law of contract. See Chokel, supra at 278, citing Blank, supra at 408.13 Although a shareholder in a close corporation always owes a fiduciary duty to fellow shareholders, good faith compliance with the terms of an agreement entered into by the shareholders satisfies that fiduciary duty. A claim for breach of fiduciary duty may arise only where the agreement does not entirely govern the shareholder’s actions.14 See Chokel, supra; Blank, supra at 408-409.
*728The judge’s declaration that the sellers were not bound by fiduciary duty and could sell their shares consistent with the provisions of art. 5, regardless of whether the buyer’s ownership would terminate DSM’s S corporation status, was correct. Art. 5 presents a comprehensive and bargained-for procedure for disposing of interests in DSM, and in the factual circumstances as presented by the pleadings, the instant controversy “falls entirely within” its scope. See Chokel, supra.
If DSM shareholders had wished to amend DSM’s articles of organization to reflect the importance of S corporation status, they could have elected to do so. We have consistently upheld reasonable restrictions on stock transfers included in corporation articles or bylaws. See Brown v. Little, Brown & Co., 269 Mass. 102, 110 (1929). See also G. L. c. 156D, § 6.27 (c) (1) (corporation may place restrictions on transfer of its shares when its status is dependent on number or identity of its shareholders). In the absence of such an amendment, art. 5 gave DSM the opportunity to protect its S corporation status by purchasing the sellers’ shares at a price based on the value of the shares as determined by the arbitrators. DSM chose not to exercise that option. DSM may not now require that the sellers be bound by additional substantive restrictions on the sale of their shares based on an asserted fiduciary duty, over and above the restrictions on stock transfers contained in the parties’ agreement as set forth in art. 5.15 In declaring the parties’ rights, the *729motion judge declined properly to impose such restrictions.16
DSM argues, as it did in its motion for judgment on the pleadings, that, even if fiduciary duties do not restrain the sellers from transferring their shares to a third-party corporation and thereby forfeiting DSM’s Subchapter S tax status, the sellers’ actions and statements evidenced an implicit agreement to preserve DSM’s Subchapter S election, or an expectation that it would be preserved.17 However, DSM’s counterclaims did not request a declaration that a subsequent agreement existed, and the judge, considering the argument, noted that if the alleged “agreement regarding Subchapter S status were independently enforceable, then ... the restriction on the sale of stock so as to destroy DSM’s Subchapter S status would derive not from fiduciary law, but from basic principles of contract interpretation.”18
3. Continuing right of first offer. DSM also sought a declaration that the sellers are required by the articles of organization, their fiduciary duty, and the implied covenant of good faith and *730fair dealing to reoffer their shares to DSM should the sellers decide to offer the shares to a third party at a price lower than the value determined by the arbitrators, or on more favorable terms. The judge correctly declared that the sellers have no obligation to make such an offer. As the judge stated, DSM’s proposed interpretation is “flatly inconsistent with the plain language of art. 5.”
It has long been established that stock transfer restrictions are to be construed narrowly. See Durkee v. Durkee-Mower, Inc., 384 Mass. 628, 633-634 (1981) (restriction applying only to “sales” will not apply to transfer by operation of law in divorce decree); Brown v. Little, Brown & Co., supra at 112-113 (stock restriction requiring buyback from retiring employees did not apply to employee who was terminated). “Words of a writing are to be construed according to the common and approved usage of the language and are not to be wrested from their usual sense to meet an exigency not foreseen when the instrument was drafted.” Durkee v. Durkee-Mower, Inc., supra at 632-633.
DSM nonetheless urges us to construe art. 5 as creating what it describes as a “pre-emptive right of first offer”19 held by DSM.20 Noting that the scope of the right of first offer has not been defined in the Commonwealth, DSM looks to other jurisdictions to support its claim that such a right includes a requirement that “no other buyer can get a better deal” than that which had been presented to DSM. See, e.g., Bill Signs Trucking, LLC v. Signs Family Ltd. Partnership, 157 Cal. App. 4th 1515, 1523 (2007); Kelly v. Ammex Tax & Duty Free Shops West, Inc., 132 Wash. App. 825, 830-832 (2011); Superior Portland Cement, Inc. v. Pacific Coast Cement Co., 33 Wash. 2d 169, 197-199 *731(1949). This argument encounters two stumbling blocks: first, the plain language of art. 5 does not contain a generic right of first offer; and second, even in the cases from other jurisdictions relied upon by DSM, none of which involves a stock restriction, the language of the contracts explicitly, rather than implicitly, requires the seller to make a new offer to the holder of the right before accepting a lower price from a third-party buyer.
The text of art. 5 begins with a requirement that a shareholder first offer his shares to the corporation, but thereafter describes a discrete process of valuation and subsequent offer at a price determined by arbitrators. See note 9, supra. Valuation processes like those described by art. 5 are often employed in close corporations because there is no ready market for stock in a close corporation, see Donahue, supra at 586, and thus the bidding process cannot be relied on fairly to value such assets. Article 5 instead provides an independent procedure to determine the fair price for the stock of DSM, a close corporation, and an opportunity for DSM to purchase offered shares at that price.
Had the drafters of DSM’s articles of organization intended to include a “right of first offer” in art. 5, they could have done so explicitly.21 “[W]e are reluctant to conclude that the covenant of good faith and fair dealing has, sub silentio, provided a specific form of protection that is not mentioned in the parties’ contract.” Uno Restaurants, Inc. v. Boston Kenmore Realty Corp., 441 Mass. 376, 386 (2004) (rejecting plaintiff’s argument that contract implicitly required owner to take particular steps not explicitly required). Neither principles governing *732fiduciary duty nor the implied covenant of good faith and fair dealing will insert such terms where the parties have not done so.
Judgment affirmed.
We acknowledge the amicus brief filed by the Arthur T. Demoulas Revocable Trust and four other trusts holding shares in Demoulas Super Markets, Inc. (DSM).
At the time of the proceedings in the Superior Court, the corporation had seventeen stockholders.
See Demoulas v. Demoulas, 432 Mass. 43 (2000); Demoulas v. Demoulas, 428 Mass. 555 (1998); Demoulas v. Demoulas Super Mkts., Inc., 428 Mass. 543 (1998); Demoulas v. Demoulas Super Mkts., Inc., 424 Mass. 501 (1997).
Corporations making a Subchapter S tax election, 26 U.S.C. §§ 1361, 1362 (2006) (S corporations), like partnerships, do not pay taxes as entities; instead, income and loss “pass through” to their stockholders. See E. Polubinski, Jr. & S.T. Freeland, Business Corporations § 4 (2011). S corporation tax status is generally considered a favorable tax status for small corporations, because this status avoids so-called “double taxation,” where the same corporate earnings are taxed as income to the corporation and as dividends to stockholders. Id. In order to qualify as and remain an S corporation, a corporation must have fewer than one hundred shareholders and only one class of stock. All stockholders must be natural persons or trusts, and none can be a nonresident alien. 26 U.S.C. § 1361(b). Stock may be owned only by a limited number of natural persons or trusts. Id. 26 U.S.C. § 1362(d)(2).
The parties also sought declarations concerning the sufficiency of the *723sellers’ notice of intent to sell and the arbitration process; those claims were dismissed as moot. DSM stipulated that its counterclaim requesting a declaration that the terms and conditions of the sellers’ offer would not apply to a purchase by DSM of the shares at an arbitrated price was moot. No argument has been made regarding these claims, and we consider them waived. See Haufler v. Zotos, 446 Mass. 489, 499 n.25 (2006); Mass. R. A. R 16 (a) (4), as amended, 367 Mass. 921 (1975).
The judge also dismissed with prejudice all of the plaintiffs’ claims against members of DSM’s board of directors. As a result of all the orders of dismissal, no claims remain pending against the individual board members. Although DSM’s notice of appeal states that it appeals from the order of final judgment and “all other orders either referenced in or merged into” the order of final judgment, it has made no argument on appeal regarding the dismissal of the claims against the board members.
Article 5 provides, in relevant part:
“Any stockholder . . . desiring to sell, assign, transfer, pledge, or hypo-thecate in any manner such stock owned by him, shall first offer it to the corporation through the Board of Directors, in the manner following:
“He shall notify the directors of his desire to sell... in writing, which notice shall contain the price and all other terms at which he is willing *724to sell. . . and the name of one arbitrator. The directors shall within [thirty] days thereafter either accept the offer or by notice to him in writing, name a second arbitrator, and these two shall name a third. It shall. . . then be the duty of the arbitrators to ascertain the value of the stock. . . .
“After the acceptance of the offer, or the report of the arbitrators as to the value of the stock, the directors shall have thirty (30) days within which to purchase the same at such valuation, but if at the expiration of thirty (30) days, the corporation shall not have exercised the right to so purchase, the owner of the stock shall be at liberty to dispose of the same in any manner he may see fit.”
The offer did not include shares held by the trusts for the benefit of Vanessa Demoulas.
In its counterclaim, DSM alleged that, in 2002, “following the transfer of DSM shares to the [sellers] as a result of litigation among the shareholders and [DSM],” the sellers “further acknowledged and agreed to the election by DSM to be a Subchapter S corporation.”
A close corporation is typified by a small number of shareholders, no ready market for the corporate stock, and substantial majority shareholder participation in the management, direction, and operations of the corporation. Donahue v. Rodd Electrotype Co. of New England, Inc., 367 Mass. 578, 586 (1975).
Although Chokel v. Genzyme Corp., 449 Mass. 272 (2007), concerned a publicly traded corporation, its holding, derived from Blank v. Chelmsford Ob/ Gyn, P.C., 420 Mass. 404 (1995) (Blank), applies to close corporations. See Fronk v. Fowler, 456 Mass. 317, 331-332 (2010) (applying holdings in Blank and Chokel decisions to limited partnerships).
Thus, the presence of a contract will not always supplant a shareholder’s *728fiduciary duty. We have allowed a party to proceed with a claim for breach of fiduciary duty in situations where a contract did not entirely govern the parties’ rights and duties, see King v. Driscoll, 418 Mass. 576, 586 (1994), S.C., 424 Mass. 1 (1996) (although mandatory stock buyback upon termination was within scope of contract, campaign to undermine stockholder-employee, and to ensure his termination to trigger buyback, was not), or where the contract was breached. See Pointer v. Castellani, 455 Mass. 537, 554 (2009) (plaintiff’s termination was in violation of contract).
The sellers concede that a sale for an improper purpose, such as a sale to a corporation for a lower price than that offered by a noncorporate buyer, without any legitimate reason, could violate the implied covenant of good faith and fair dealing. No claim has been made that the sellers intend to sell their shares for an improper purpose. Compare A.W. Chesterton Co. v. Chesterton, 128 F.3d 1, 4 (1st Cir. 1997) (Chesterton) (stockholder of S corporation, unable to sell his shares either to corporation or in open market, proposed to transfer his shares to his shell corporations, which would not have increased their marketability or otherwise advanced his interests but would have terminated corporation’s favorable tax status). In Chesterton, the court held *729that the shareholder’s actions were a breach of fiduciary duty despite being governed by a shareholder agreement. In that case, the plaintiff company’s original complaint alleged, in addition to breach of fiduciary duty, breach of contract and of the implied covenant of good faith and fair dealing, but the parties stipulated to the dismissal with prejudice of all claims but those relating to fiduciary duty. In factual circumstances like those presented in Chesterton, our decision in Blank, supra at 407-408, would control, providing a viable claim of breach of the implied covenant of good faith and fair dealing.
Given the requirements of Federal law in regard to S corporations, injunctive relief requiring notice prior to a sale or enjoining a sale in violation of a seller’s duties to the corporation may be appropriate on a proper showing in certain factual circumstances. See 26 U.S.C. § 1361(b)(3)(D) (following termination of S corporation status, corporation not eligible to reapply for status for five years). DSM is free, upon an appropriate factual showing, to file a complaint seeking such relief. See note 15, supra.
In support of this argument, DSM filed a motion asking that the judge take judicial notice of testimony given by one of the sellers at a trial in an earlier case. Although there is no indication that the judge ruled explicitly on the motion, which properly should have been denied, see Nantucket v. Beinecke, 379 Mass. 345, 351-353 (1979); Mass. G. Evid. § 201 (2012), the judge implicitly denied it.
In addition to the fact that DSM’s counterclaims did not include a request for a declaration of its rights based on an agreement separate from that set forth in art. 5, both parties filed motions for judgment on the pleadings stating that the declarations sought by them could be addressed based solely on the pleadings and attachments thereto, and the judge could not properly have considered matters outside these materials in declaring the parties’ rights.
Where there is a “right of first offer,” the seller first must offer to sell to the grantee, specifying the price and terms on which the seller is willing to sell, before offering the property to a third-party buyer. See A.L. Nichols, Massachusetts Corporate Forms and Practice Manual, Form 13.11 n.2 (2008) (share transfer restriction agreement).
DSM argues also that a perpetual right of first offer is required to protect the corporation because the sellers manipulated the art. 5 process, attaching unpalatable terms to the arbitrated price so that DSM could not, “in the exercise of its business judgment and fiduciary duties,” purchase the shares. DSM initially sought a declaration that the terms of the sellers’ offer could not attach to DSM’s postarbitration option to purchase, but subsequently stipulated that the question was moot. See note 7, supra, We therefore do not address the issue.
Compare Fletcher, Corporation Forms § 10:140 (5th ed. rev. 2011) (setting forth sample stock transfer restriction describing right of first offer), with § 10:144 (“Appraisal with option to corporation to purchase at appraised value,” describing process similar to art. 5). See also W.V. Hovey & A.B. Koenig, Legal Forms § 8:4 (5th ed. 2008) (right of first offer provision); MJ. Bohnen & D.C. Coggins, Massachusetts Corporate Forms, Form 3.4.1 (2012) (“Corporate First Refusal in Case of Third Party Offer and Option to Purchase in Case of Unpermitted Transfer”); A.L. Nichols, Massachusetts Corporate Forms and Practice Manual, Form 13.11 (2008) (corporate right of first refusal allows selling shareholder who had offer in hand to “transfer the Offered Shares to the proposed transferee or any other purchaser, provided that this sale shall not be on terms and conditions more favorable to the purchaser” than those offered to corporation).