(dissenting, with whom Hennessey, C.J. joins). As the Attorney General argues, the event specified in Marian Hovey’s will as triggering the charities’ right to the trust principal occurred — Marian Hovey’s nephews died without leaving living appointees of the trust principal. Therefore, contrary to the court’s holding, the trustees should not be instructed to pay the principal to the executors of Cabot Jackson Morse, Jr.’s, estate. Rather, they should be instructed that “the whole trust fund shall be paid over and transferred in equal shares to the Boston Museum of Fine Arts, the Massachusetts Institute of Technology, and the President and Fellows of Harvard College for the benefit of the Medical School.”
Our decision in Massachusetts Inst. of Technology v. Loring, 327 Mass. 553 (1951), does not bar a holding in the present case that the charities are entitled to the trust principal. The court states that if the Justices “were to depart from the view taken thirty-four years ago in Massachusetts Inst. of Technology v. Loring, . . . and now were to conclude that under the terms of Marian Hovey’s will the charities were to receive the trust principal, [the Justices] would face the problem that, under normal principles of res judicata, our earlier decision against *175the charities is binding on them.” Supra at 172-173. The court’s construction of Marian Hovey’s will as providing that the charities are not entitled to the trust principal because her surviving nephew appointed the trust income to his wife avoids the perceived res judicata problem. However, the court’s task is to construe the will fairly, uninfluenced by any inclination to avoid problems implicating principles of res judicata. That fact forcefully suggests that normal principles of res judicata should not be applied in the circumstances of this case, and no one, including the charities, should be precluded from claiming that the charities are entitled to the trust principal under Marian Hovey’s will.
It is well settled that “even where the technical requirements of res judicata have been established, a court may nonetheless refuse to apply the doctrine.” International Harvester Co. v. Occupational Safety & Health Review Comm’n, 628 F.2d 982, 986 (7th Cir. 1980). The doctrine of res judicata is applied by the courts to “relieve parties of the cost and vexation of multiple lawsuits, conserve judicial resources, and, by preventing inconsistent decisions, encourage reliance on adjudication.” Aetna Casualty & Sur. Co. v. Niziolek, 395 Mass. 737, 742 (1985), quoting Allen v. McCurry, 449 U.S. 90, 94 (1980). Since the court must now determine for the first time the proper disposition of the trust fund after considering numerous possibilities advanced by many contenders, neither judicial economy nor the prevention of cost and vexation is achieved by precluding the charities and the Attorney General from advancing their views as to the appropriate construction of Marian Hovey’s will. Furthermore, since the court in 1951 did not settle the question as to what party or parties are entitled to the fund, no party reasonably could have relied on that decision as adjudicating that party’s entitlement.
The doctrine of res judicata is an expression of public policy, and, as such, it must yield, on occasion, to public policy of greater weight. See Boucher v. Dramstad, 522 F. Supp. 604, 607 (D. Mont. 1981) (“[R]es judicata is a principle of public policy to be applied so as to render rather than deny justice. The rule is intended to serve the aims of fairness and efficient *176judicial administration and need not be applied mechanically where those ends would not be served”); In re Scientific Control Corp., 80 F.R.D. 237, 243 (S.D.N.Y. 1978) (“Underlying principles of public policy, fairness and equity must temper application of the doctrine of res judicata where rigidity, injustice or unfairness would ensue”). The Restatement of Judgments also acknowledges the flexible nature of the doctrine of res judicata. According to the Restatement, the rules of preclusion should not apply to extinguish a claim where “[i]t is clearly and convincingly shown that the policies favoring preclusion of a second action are overcome for an extraordinary reason, such as the apparent invalidity of a continuing restraint or condition having a vital relation to personal liberty or the failure of the prior litigation to yield a coherent disposition of the controversy’’’ (emphasis added). Restatement (Second) of Judgments § 26(l)(f) (1982).
Even if normal principles of res judicata are to be applied so as to bar the charities’ claims, they do not bar the Attorney General’s claim that the charities are entitled to the remainder of the trust fund. The Attorney General, the representative of the public, was not a party in the Massachusetts Inst. of Technology v. Loring case. Even if the decision in that case be deemed binding on the charities, it does not follow that the Attorney General is also bound. Inexplicably, the court gives virtually no attention to whether the Attorney General represents interests in the present case that are entitled to be heard and were not heard in the earlier case. Consideration of that question is highly relevant to a determination of whether the Attorney General has a right to be heard now.
The interest of the public in the proper application of funds given to public charities has been recognized by statute for well over 100 years. The Act of 1847, c. 263, provided in pertinent part: “The district attorneys of this Commonwealth shall see that all funds, given or appropriated to public charities within their several districts, are duly applied to their respective objects; and they are hereby authorized and required to use all lawful process to prevent the misapplication thereof, and to apply all lawful remedies for the correction of abuses and *177breaches of trust in the administration of the same.” That statute has continued in force without material change to the present time. The present codification, G. L. c. 12, § 8 (1984 ed.), provides: “The attorney general shall enforce the due application of funds given or appropriated to public charities within the commonwealth and prevent breaches of trust in the administration thereof.”
Before the enactment of St. 1954, c. 529, § 1, which added § 8G to G. L. c. 12, no statute made the Attorney General a necessary party to proceedings concerning the application of funds to public charities. However, long before that statute was enacted, this court recognized that the public has a significant interest in the proper application of funds belonging to public charities and that protection of that interest is the exclusive function of the Attorney General in whose absence no determination of the rights of the public can be made. Springfield Safe Deposit & Trust Co. v. Stoop, 326 Mass. 363, 366 (1950) (“[The Attorney General] represents the public in a charitable trust, and no determination of the rights of the public can be made in his absence. G. L. [Ter. Ed.] c. 12, § 8. Burbank v. Burbank, 152 Mass. 254, 256-257 [1890]”).1 In Burbank v. Burbank, supra, we said that “the law has provided a suitable officer to represent those entitled to the beneficial interests in a public charity. It has not left it to individuals to assume this duty, or even to the court to select a person for its performance. ... No proceedings in regard to a public charity, no matter how general the assent of those beneficially interested, would bind him if not made a party . . . .” *178See Lopez v. Medford Community Center, Inc., 384 Mass. 163, 167 (1981); Budin v. Levy, 343 Mass. 644, 647-648 (1962); Ames v. Attorney Gen., 332 Mass. 246, 250-251 (1955); Elias v. Steffo, 310 Mass. 280, 284 (1941); Dillaway v. Burton, 256 Mass. 568, 573 (1926); Parker v. May, 5 Cush. 336, 338 (1850).
Making reference to Eustace v. Dickey, 240 Mass. 55, 86 (1921), the court expresses concern that “[t]o conclude now that the Attorney General’s involvement was indispensable to a valid determination in the 1951 action would cast a shadow over hundreds of pre-1954 decisions concerning charitable interests under wills and trusts.” Supra at 173 & n.10.2 The court’s concern is unnecessary. The court would do nothing new were it to conclude that, since the Attorney General was not a party to the 1951 action, the decision was not binding on him or on the public interest of which he is the exclusive representative. Surely, nothing suggests that our adherence to that principle for over 100 years has been mischievous, or that circumstances have recently changed so that departure from that long-standing principle is now required.
Principles of res judicata, then, do not bar the Attorney General from contending, as he does, that the charities are *179entitled to the trust principal. Notwithstanding the court’s statement that “the public interest in protecting the charities’ rights was fully accommodated by the Justices of this court in its prior decision,” supra at 173,3 the fact is that the Attorney General, who alone represents the public interest, has not been heard before on the substantive issue presented by this case. The representatives of the charities in the 1951 litigation did not represent the public. The fact that the charities sought the result for which the Attorney General now argues is immaterial. Sturbridge v. Franklin, 160 Mass. 149, 151 (1893). Therefore, because the Attorney General was not a party to the Massachusetts Inst. of Technology v. Loring case, he is not barred by the principles of res judicata from asserting as the exclusive representative of the public interest in this matter that the charities are entitled to the principal of the Marian Hovey trust. Unless the Attorney General is heard now by a court uninhibited by concerns about res judicata principles, the public will have been denied a forum. The position advanced by the Attorney General, therefore, should be given full consideration by the court.
The Attorney General argues that the condition on which the charities’ right to the trust principal depends has occurred and that, therefore, the plaintiff trustees should be instructed to distribute the fund to them. The Attorney General is correct. By Article Seventh of her will, Marian Hovey left the residue of her estate in trust. Article Seventh provides that at the death of the last survivor of the testatrix, her brother, sister, and two nephews, “the trustees shall divide the trust fund . . . into two equal parts, and shall transfer and pay over one of such parts to the use of the wife and issue of each of my said nephews as he may by will have appointed .... If either of my said nephews shall leave no such appointees then living, the whole of the trust fund shall be paid to the appointees of his said brother as aforesaid. If neither of my said nephews leave such *180appointees then living the whole trust fund shall be paid over and transferred in equal shares to [the charities] . . . .” The court holds that the sole condition on which the charities are to take is that neither nephew leave an appointee of any part of the trust fund, including the trust income. That interpretation of the will not only does violence to the language of the instrument, but it interferes with Marian Hovey’s manifest testamentary plan. Therefore, it cannot be correct.
Whenever possible, a will ought to be construed as providing a rational plan for the disposition of the testator’s property. See Sears v. Childs, 309 Mass. 337, 344 (1941); Prescott v. St. Luke’s Hosp., 280 Mass. 229, 233 (1932). “In order to effect such [a plan] we may within reasonable limits supply by implication a defect in its expression. . . . Grammatical construction may be altered, sentences and words transposed, and words supplied if necessary to give effect to the manifest intent” (citations omitted). Balcom v. Balcom, 333 Mass. 599, 601-602 (1956). As I will demonstrate, the relevant language in Marian Hovey’s will is reasonably susceptible of only one construction consistent with a reasoned method of accomplishing her manifest over-all objective, and that construction should be adopted by this court.
Marian Hovey’s will clearly expresses her intent to dispose of the entire residue of her estate, in trust, for the benefit of several classes in accordance with expressed priorities; first, for the benefit of her brother, sister, and nephews; second, for the benefit of her nephews’ wives (income only) and her nephews’ issue to the extent the nephews, in their discretion, might determine; and, third, for the benefit of the charities to the extent that the trust fund is not exhausted for the benefit of the nephews’ wives and issue. The provision that if neither nephew leaves “such appointees then living” the whole fund is to go to the charities obviously was designed to give to the charities those trust funds not appointed to issue who were living at the expected time of distribution. To express literally that manifest intent, a language modification is required, but the modification is minor and fits well within the principles of Balcom v. Balcom, supra at 602. As modified by insertion of the word “remaining,” the relevant provision reads: “If *181neither of my said nephews leave such appointee then living the whole [remaining] trust fund shall be paid over” to the charities. The will, construed in any other manner even remotely justified by its language, fails to express a cohesive rational plan to dispose of Marian Hovey’s property.
In Massachusetts Inst. of Technology v. Loring, supra, the charities brought a petition alleging that the trust was entitled to certain funds they claimed had been paid wrongfully to third parties. The court was not called on, as it is here, to weigh the relative merits of competing claims of entitlement to the trust principal. That fact may well explain the court’s holding. In any event, in a brief opinion, the court concluded that the charities had no remainder interest in the trust fund and they therefore lacked standing to bring the petition. The court explained its conclusion in the following manner: “The rights of the petitioning charities as remaindermen depend upon the proposition that Cabot J. Morse, Senior, did not leave an ‘appointee’ although he appointed his wife Anna Braden Morse to receive the income during her life. The time when, if at all, the ‘whole trust fund’ was to be paid over and transferred to the petitioning charities is at the time of the death of Cabot J. Morse, Senior. At that time the whole trust fund could not be paid over and transferred to the petitioning charities, because Anna Braden Morse still retained the income for her life. We think that the phrase no ‘such appointees then living’ is not the equivalent of an express gift in default of appointment, a phrase used by the testatrix in the preceding paragraph.” Id. at 555-556. The court today adopts this explanation in support of its conclusion that the charities are not entitled to the fund.
The explanation is seriously flawed. It makes no attempt to harmonize the relevant will provisions with an identified overall testamentary objective. See Boston Safe Deposit & Trust Co. v. Children’s Hosp., 370 Mass. 719, 726 (1976); Tucci v. DeGregorio, 358 Mass. 493, 495-496 (1970); Lamb v. Jordan, 233 Mass. 335, 340 (1919). Instead, it creates disharmony. To be sure, Marian Hovey’s interest in benefiting the charities was secondary to her interest in benefiting those family members appointed by her nephews to receive benefits, but *182clearly her interest in the charities was not so minimal that she intended to preclude them from receiving trust principal simply because a nephew appointed his wife to receive trust income. Marian Hovey’s priority of interests fully accounts for a provision that the charities take only such part of the trust fund as remains after the nephews have exercised their powers of appointment, but no priority of interests — no rational plan — no over-all objective is served by a provision that is construed to mean that even though no one has been appointed to receive the trust principal the charities are not entitled to receive the remaining funds. The court offers no explanation now, and it offered none in Massachusetts Inst. of Technology v. Loring, supra, as to why, consistent with some rational testamentary plan, the rights of the charities to the trust principal should depend on there having been no appointment of trust income.
After explaining that the rights of the charities depend on Cabot Jackson Morse’s not leaving “an ‘appointee, ’ ”4 the court in Massachusetts Inst. of Technology v. Loring, 327 Mass. 553, 555-556 (1951), stated that “[t]he time when, if at all, the ‘whole trust fund’ was to be paid over and transferred to the petitioning charities is at the time of the death of Cabot J. Morse, Senior. At that time the whole trust fund could not be paid over and transferred to the petitioning charities, because Anna Braden Morse still retained the income for her life.” Those statements add nothing of substance to the statement preceding them. Of course, if the charities are entitled to the trust principal only in the absence of an appointment of the income, it follows that the time for payment to them was when Cabot Jackson Morse (Cabot J. Morse, Sr.) died. But if, as I contend, the charities are entitled to the trust principal regardless of the appointment of Anna Braden Morse to receive the income, then the time when the fund is to be paid to the charities is now. There is no provision in the will that the charities’ rights to the trust fund depend on the time the fund becomes distributable.
*183The last reason that the court gave in Massachusetts Inst. of Technology v. Loring for its conclusion that the charities had no remainder interest in the trust fund was its thought “that the phrase no ‘such appointees then living’ is not the equivalent of an express gift in default of appointment, a phrase used by the testatrix in the preceding paragraph.” Id. at 556. That statement, adopted by the court today, seems to suggest that even if there had been no appointment of trust income at all the court would not have recognized remainder interests in the charities because Marian Hovey failed to express a gift to the charities in default of appointment in the same words she used in the preceding paragraph. As the present court puts it, “[i]t is apparent that Marian Hovey knew how to refer to a disposition in default of appointment from her use of the terms elsewhere in her will. She did not use those words in describing the potential gift to the charities.” Supra at 170. No authority is given to support the proposition that there is but one way to express a gift in default of appointment, and such a proposition is not valid. There is no required formula. Such a gift need only be clearly stated and not merely implied or left to inference. The provision that “[i]f neither of my said nephews leave such appointees then living the whole trust fund shall be paid over” to the charities, clearly expresses a gift to the charities in default of appointment of the whole trust fund to persons living at the expected time of distribution. The court should not be concerned that in the relevant paragraph Marian Hovey did not use the same gift in default of appointment language that she used in the preceding paragraph. Even if there were no explanation for the differences in expression, the language in the relevant paragraph clearly expresses a gift in default of appointment to living appointees. Furthermore, there is a simple explanation for the differences in language. The language in question was well chosen to express not only a gift in default of appointment, as provided in the earlier paragraph, but also to express the idea that, even if appointments were made, unless the appointees were living at the time for distribution the money would go to the charities.
*184Adopting the result and the reasoning (indeed, the very language) of Massachusetts Inst. of Technology v. Loring, the court, erroneously in my view, concludes that the charities are not entitled to the trust principal. The court then proceeds, again erroneously, in my view, to the conclusion that the executors of the estate of Cabot Jackson Morse, Jr., are entitled to the fund. The court bases its conclusion on the rule, cited in numerous treatises, that “when a special power of appointment is not exercised and absent specific language indicating an express gift in default of appointment, the property not appointed goes in equal shares to the members of the class to whom the property could have been appointed.” Supra at 171. I do not quarrel with the rule, but I quarrel with the court’s application of it. The rule includes the clause, “and absent specific language indicating an express gift in default of appointment.” That is an important clause because the rule, like other rules of construction, is intended to aid in ascertaining the testatrix’s intent, and should not be applied to defeat it. First Safe Deposit Nat’l Bank v. Westgate, 346 Mass. 444, 447-448 (1963). In the absenpe of such specific language, it is reasonable to infer that the testator intended that in default of appointment the property would go to the whole class of permissible appointees equally. Otherwise, distribution of the property would be controlled by the laws governing intestate succession, a result not likely to have been intended by one who makes a will. But here the critical language disclosing the testatrix’s intent is present. There is no need for inference. Here, contrary to the court’s holding, there is an express gift to the charities in default of appointment to living appointees, and it should be given effect. The “rule” does not say otherwise.
The doctrine of res judicata does not require that the court follow Massachusetts Inst. of Technology v. Loring, and, because the values in overruling that decision outweigh the values underlying stare decisis, see Franklin v. Albert, 381 Mass. 611, 617 (1980), I would overrule it,5 and I would instruct the *185plaintiff trustees to distribute the remainder of the trust fund in equal shares to the Massachusetts Institute of Technology, the Boston Museum of Fine Arts, and the President and Fellows of Harvard College.
The quoted statement was not limited to settlement situations, as implied by the court. The charity and the other claimants competing for the trust money in Springfield Safe Deposit & Trust Co. v. Stoop had been parties to an earlier case reported at 304 Mass. 224 (1939). That case did not involve a settlement. The Attorney General was not a party. The court in Springfield Safe Deposit & Trust Co. v. Stoop, supra at 366, said, “When the case reported in 304 Mass. 224 came before the court, the Attorney General was not a party. He represents the public in a charitable trust, and no determination of the rights of the public can be made in his absence. G. L. (Ter. Ed.) c. 12, § 8. Burbank v. Burbank, 152 Mass. 254, 256-257 [1890].”
In Eustace v. Dickey, supra, the court answered the Attorney General’s challenge to its jurisdiction to decide, in a case to which the Attorney General was not a party, the right of a charity’s directors to remove a trustee. That case does not affect the present controversy. The question here is not whether the court was without jurisdiction to decide Massachusetts Inst, of Technology v. Loring, but is only whether the substantial rights of the public can be decided in the Attorney General’s absence.
Furthermore, in Eustace v. Dickey, the court characterized the question before it as involving the public interest only “remotely and accidentally” and observed that its “decision will not directly pass upon interests of which the Attorney General in his official capacity is the representative.” Id. at 86. The distinction between the public’s “remote and accidental” interest in whether the directors of a charity have the right to remove a trustee, and the public’s direct and substantial interest in the proper application of a charity’s funds is critical. That distinction is clear on its face, and it is reflected in the many decisions of this court before and after the decision in Eustace v. Dickey, holding that no determination of the public interest in the application of funds to charities can be made in the absence of the Attorney General as a party.
The result that the court reached in its prior decision, adverse to the charities, gives little support to the assertion that in that case the Justices accommodated the interest of the public.
The relevant provision uses the words “such appointees,” referring to appointees of the whole trust fund. The words “an appointee,” possibly suggesting an appointee of part of the fund, do not appear in the will.
The court is guilty of overstatement when it says, at 170, that “[i]n Frye v. Loring, 330 Mass. 389, 393 (1953), the court reiterated that the *185charities had no interest in the trust fund.” In Frye v. Loring, 330 Mass. at 393, the court simply made the observation, unnecessary to its decision, that “[i]n Massachusetts Institute of Technology v. Loring, 327 Mass. 553, it was held that these corporations have no interest in the trust fund.” It is unnecessary, therefore, to overrule Frye v. Loring.