OPINION OF THE COURT
Meyer, J.Because the Not-For-Profit Corporation Law (N-PCL) provisions governing a Type B corporation1 expressly incorporate a quasi-cy pres principle with respect to both the administration and use of its assets (§ 513 [b]; § 522) and the transfer of its assets on dissolution (§ 1005 [a] [3] [A]; § 1008 [a] [15]), section 804 of that law, which permits amendment of the certificate of incorporation of such a corporation, cannot be construed to authorize an amendment inconsistent with the purposes for which funds were given to the corporation without compliance with such quasi-cy pres principles. The order of the Appellate Division should, therefore, be modified and, as so modified, should be affirmed, with costs to plaintiffs.
I
The Knapp Foundation is a nonprofit corporation established in 1923 by act of the Legislature (L 1923, ch 21, as amended by L 1927, ch 607). The Foundation was organized “for the purpose of receiving and maintaining a fund or funds, administering the same and applying the principal and income thereof, and either of them, to render aid and assistance to promote the social, physical or economic welfare and efficiency of such persons as have been, or at any time in the future shall be, employed in any printing, publishing or lithographing corporation of which Joseph P. Knapp has been or shall hereafter be a stockholder, director or officer, or in any corporation which shall be a successor corporation thereto * * * and to render aid and assistance to *463the families of the persons so employed by such agencies and means as from time to time shall be found appropriate therefor” (id., § 1). The corporation was granted the power to take and hold real or personal property and to invest and reinvest the principal and income thereof and to “deal with and expend the principal and income of the corporation in such manner as in the judgment of the trustees will best promote its objects” (id., § 2). In 1927, the 1923 act was amended to insert a new section 1-a, providing that any unused income not required for the corporation’s stated purposes may be used to be helpful to others in whatever ways seem wise to the trustees. As authorized by N-PCL 103 and 113, on or about August 22, 1973, the Foundation filed a certificate of type designating it as a Type B corporation, the effect of which is to make the N-PCL applicable in all respects to the Foundation (103 [a]; 113 [d]).
The Foundation’s primary purpose was thus to assist employees of the founder’s corporations and their families. Applications by such persons were decided upon by the trustees in their absolute discretion and, when approved, usually took the form of a loan. In recent years, however, the number of such applications has declined; only one such request has been made since 1978. As a consequence, the Foundation has utilized its income, as authorized by section 1-a of its charter, to benefit a broader class of charitable purposes, making contributions to numerous charities and nonprofit organizations. Because of its employee-oriented primary purpose, however, the Foundation’s income is not exempt from Federal tax.
In light of the absence of individual applications and its continued liability for Federal income tax, the Foundation’s trustees resolved that the original intent of the founder would best be served by the dissolution of the Foundation and the transfer of its assets to The Knapp Foundation (North Carolina), founded by Joseph Knapp in 1929, which is tax exempt and the trustees of which are the same persons as govern defendant Foundation. The North Carolina Foundation makes contributions to recognized tax-exempt organizations qualified to receive such contributions but does not provide assistance to individuals. On January 10,1983, the New York Foundation executed a certificate of amendment of its certificate of incorporation authorizing the trustees “in their absolute discretion” to apply principal and income of the Foundation to any other charitable organization founded by Joseph P. Knapp, including the North Carolina Foundation. The Attorney-General noted no objection to the amendment, and on February 2,1983 it was approved by a Supreme Court Justice, who consented that it be filed.
*464The present action was begun in March 1983. Plaintiffs are a corporation claiming to be a “successor corporation” within the meaning of the 1923 act, whose employees are intended beneficiaries of the Foundation, as well as two individual employees of the corporate plaintiff. In their first cause of action, they seek a declaration that employees of the corporate plaintiff are beneficiaries of the New York Foundation and an accounting by the trustees; in the second, they ask that the 1983 certificate of amendment be declared invalid and that the Foundation be enjoined from transferring its assets and from dissolving its corporate existence.
Plaintiffs moved for a preliminary injunction against the proposed transfer of assets and for summary judgment on each of their claims. Defendant cross-moved to dismiss the complaint and for summary judgment. Special Term dismissed the complaint as to the corporate plaintiff on the ground that the dismissal for lack of standing of its prior New Jersey action against the Foundation for the same relief barred maintenance of the instant action2 and, as against the individual plaintiffs, granted defendant’s motion for summary judgment, concluding that amendment of the certificate of incorporation and dissolution of the Foundation were within the discretionary authority of the trustees.3 The Appellate Division affirmed, without opinion. We conclude (1) that the New Jersey dismissal is not res judicata and that both the corporate and the individual plaintiffs have standing to maintain the action and (2) that the amendment of the certificate of incorporation without passing upon quasi-cy pres considerations as required by the Not-For-Profit Corporation Law was improper. We, therefore, modify the Appellate Division’s order of affirmance to deny both defendant’s motion to dismiss and its motion for summary judgment, but because the courts below did not pass on the status of plaintiff as “a successor corporation” under the 1923 act and its status as such is disputed in the papers before us, we are in accord with the Appellate Division’s affirmance of the remaining provisions of Special Term’s order.
*465II
The res judicata argument stems from the New Jersey action brought by the corporation alone against defendant Foundation. That action was dismissed by New Jersey’s Superior Court for lack of standing and the dismissal was affirmed by the Appellate Division of that court. That ruling should not be accorded res judicata effect, however, because a dismissal for lack of standing as applied by New Jersey courts is not a dismissal on the merits (Restatement [Second] of Judgments § 20 [2]; 5 Weinstein-Korn-Miller, NY Civ Prac ¶ 5011.11, at 50-87; 50 CJS, Judgments, §§627, 633 [d]; 46 Am Jur 2d, Judgments, §§ 479, 508), any more than would be a dismissal for prematurity (Moloney v Nelson, 158 NY 351; Converse v Sickles, 146 NY 200). In any event, the prior action involved only the application of New Jersey’s policy in relation to standing, not whether as a matter of New York law and policy the corporation had standing.
As a matter of New York law, both the individual and the corporate plaintiffs have standing to maintain the action. As to the individual plaintiffs, no case squarely in point has been found but on analogy to trust law they should be accorded standing. The general rule is that one who is merely a possible beneficiary of a charitable trust, or a member of a class of possible beneficiaries, is not entitled to sue for enforcement of the trust (Lefkowitz v Lebensfeld, 68 AD2d 488, 495, affd 51 NY2d 442; Matter of James, 22 Misc 2d 1062,1067-1068; Revici v Conference of Jewish Material Claims Against Germany, 11 Misc 2d 354, 357; Matter of Herman [Ten Broeck Free Academy], 177 Misc 276, 280-281; Bogert, The Law of Trusts and Trustees § 414, at 436 [2d rev ed]). Instead, the Attorney-General has the statutory power and duty to represent the beneficiaries of any disposition for charitable purposes (EPTL 8-1.1 [f]; 8-1.4; see, Lefkowitz v Lebensfeld, 51 NY2d 442, supra; Trustees of Sailors’ Snug Harbor v Carmody, 211 NY 286, 300).
There is an exception to the general rule, however, when a particular group of people has a special interest in funds held for a charitable purpose, as when they are entitled to a preference in the distribution of such funds and the class of potential beneficiaries is sharply defined and limited in number (see, Restatement [Second] of Trusts § 391 comment c; 4 Scott, The Law of Trusts § 391, at 3008-3009 [3d ed]; Bogert, The Law of Trusts and Trustees § 414 [2d rev ed]). Iii the present case there is a class of beneficiaries which is both well defined and entitled to a preference in the distribution of defendant’s funds prior to *466the disputed amendment, viz., the employees of corporations in which Joseph P. Knapp was involved and the employees of successors to such corporations.
Furthermore, the policy reasons for limiting standing in this area are not applicable in this case. Normally, standing to challenge actions by the trustees of a charitable trust or corporation is limited to the Attorney-General in order to prevent vexatious litigation and suits by irresponsible parties who do not have a tangible stake in the matter and have not conducted appropriate investigations (Bogert, The Law of Trusts and Trustees § 414, at 436, supra). However, the present action concerns not the ongoing administration of a charitable corporation, but the dissolution of that corporation and the complete elimination of the individual plaintiffs’ status as preferred beneficiaries of the funds originally donated by Joseph Knapp. The individual plaintiffs, therefore, have standing.
There is authority for according standing to the corporate plaintiff as well (see, Walton v Collins, 38 App Div 624, affd 167 NY 538; cf. Matter of Jones, 191 Misc 617, 619) and doing so appears consistent with the views on standing expressed in cases such as Matter of Douglaston Civic Assn. v Galvin (36 NY2d 1) and Matter of National Org. for Women v State Div. of Human Rights (34 NY2d 416). In view of the direction for notice to the Attorney-General in N-PCL 522 (b) (see also, EPTL 8-1.1 [f ]) and on analogy to general trust law relating to enforcement of a charitable trust (Restatement [Second] of Trusts § 391, at 2b0; Bogert, The Law of Trusts and Trustees § 414, at 436, supra; 4 Scott, The Law of Trusts § 391, at 3009, supra), notice should, however, be given to the Attorney-General before the matter proceeds further.4
Ill
Defendant’s argument on the merits, accepted by the courts below, is that the amendment to the Foundation’s charter not having been objected to by the Attorney-General and having been approved by a Supreme Court Justice pursuant to N-PCL 804, that ends the matter. While a corporation created by special act of the Legislature is authorized to amend its charter in the manner provided by N-PCL article 8, and the article does not differentiate between the various types of not-for-profit corporations with respect to the procedure for amendment, the law must *467be read so as to harmonize its various provisions (McKinney’s Cons Laws of NY, Book 1, Statutes §§ 97, 98). So to read the law does not give the directors the unlimited power of amendment for which defendant argues, for the powers of the directors of a Type B corporation, both as to how its assets are administered and as to its dissolution, and the power of a Supreme Court Justice when approving the certificate of dissolution of a Type B corporation, are expressly limited by quasi-cy pres considerations under provisions of articles 5 and 10 of the N-PCL.
Thus, section 513 (a) provides that a Type B corporation “shall not be deemed a trustee of an express trust” of assets “given * * * or otherwise vested in such corporation in trust for, or with a direction to apply the same to, any purpose specified in its certificate of incorporation,”5 but subdivision (b) of the same section imposes its own limitation upon the directors, requiring that: “Except as may be otherwise permitted under article eight of the estates, powers and trusts law or section 522 (Release of restrictions on use or investment), the governing board shall apply all assets thus received to the purposes specified in the gift instrument and to the payment of the reasonable and proper expenses of administration of such assets.” EPTL article 8 authorizes the Supreme Court or, as to a disposition by will, the Surrogate’s Court, to direct how charitable funds shall be administered when tne purpose for which originally given or bequeathed becomes “impracticable or impossible” (EPTL 8-1.1 [c], [d]),6 and N-PCL 522 (which is a modified version of the Uniform Management of Institutional Funds Act, see, 1978 McKinney’s Session Laws of NY, at 1774) incorporates similar provisions in that law. Subdivisions (b), (c) and (d) of the latter section provide, so far as pertinent, that:
“(b) If written consent of the donor cannot be obtained by reason of his death, disability, unavailability, or impossibility of identification, the governing board may apply in the name of the corporation (i) to the supreme court of the judicial district wherein the corporation has its office or principal place of carrying out the purposes for which is was formed, or (ii) where the applicable gift instrument is a will, to the surrogate’s court in which such will is probated, for release of a restriction *468imposed by the applicable gift instrument on the use or investment of an institutional fund. The attorney general shall be notified of the application and shall be given an opportunity to be heard. If the court finds that the restriction is obsolete, inappropriate, or impracticable, it may by order release the restriction in whole or in part * * *
“(c) A release under this section may not allow a fund to be used for purposes other than the purposes of the corporation.
“(d) This section does not limit the application of the doctrine of cy-pres.”7
There can be no question, therefore, that the transfer of principal from the defendant Foundation to The Knapp Foundation (North Carolina), as authorized by the amended certificate of incorporation, required more than the pro forma approval of the amendment that was obtained. To permit the corporation by a charter amendment such as here adopted to change the purpose for which funds given to it are required to be held would short-circuit completely the limitations imposed by sections 513 and 522 and permit the Foundation trustees to exercise a power given specifically and only to a Supreme Court Justice as concerns property received by the corporation by inter vivos gift.
Similar limitations are imposed with respect to the dissolution of a Type B corporation. N-PCL 1001 authorizes the board of a not-for-profit corporation to adopt a plan of dissolution, but *469section 1002 (d) requires that as to a Type B corporation the plan be approved by a Justice of the Supreme Court on verified petition and on notice to the Attorney-General; section 1005 (a) (3) (A) mandates that the assets of a dissolved Type B corporation “be distributed to one or more domestic or foreign corporations or other organizations engaged in activities substantially similar to those of the dissolved corporation pursuant to a plan of distribution adopted * * * as ordered by the court to which such plan is submitted for approval under section 1002” and that “such disposition [to the acquiring corporation] shall be devoted by the acquiring corporation or organization to the purposes intended by the testator, donor or grantor”;8 and section 1008 (a) (15) authorizes the Supreme Court to “suspend or annul the dissolution * * * and * * * make all such orders as it may deem proper in all matters in connection with the dissolution” of a Type B corporation where the distribution of its assets is to be made to a corporation “engaged in activities substantially similar to those of the dissolved corporation”. Clearly, thereforé, the simple process of amending the corporate charter as provided in N-PCL article 8 is legally insufficient to authorize either the transfer of assets or the distribution on dissolution that has here been attempted (cf. N-PCL 804 [d]).
Although, as noted above, there is pending a separate proceeding by the corporation seeking approval of its dissolution, the demand for relief in plaintiffs’ complaint in the present action expressly asked that dissolution of the Foundation be enjoined. Furthermore, the amendment of the Foundation’s certificate of incorporation was only the initial step in carrying out the resolution of its trustees, adopted some time prior to October 19, 1982, which recited the judgment of the trustees that the Foundation had “substantially accomplished the purposes set forth by *470its Founder” and that his original intent “would best be served by * * * dissolution of The Knapp Foundation and the transfer of its assets to The Knapp Foundation, Inc. (N.C.) * * * for the purpose of furthering the good works of that organization” and authorized the legal representatives of the Foundation “to institute proceedings with the Attorney General of the State of New York for the dissolution of The Knapp Foundation and the transfer of its remaining assets * * * to The Knapp Foundation, Inc. (N.C.) to be used for such purposes as the Board of Trustees of that organization may deem proper”. That the amendment of the certificate of incorporation was but a step “in carrying out the aforesaid Resolution” is attested by the affidavit of William Horton, New Jersey counsel for the Foundation and thus one of the legal representatives so authorized. It is borne out also by the resolution of the trustees adopted March 8,1983, adopting a plan of dissolution. It is these actions of the trustees which Special Term held to be decisions “made within the discretionary authority granted to the Trustees by law.”
It is, thus, apparent that the amendment of the certificate of incorporation approved February 2, 1983, the transfer of the bulk ($700,000) of the Foundation’s assets to the North Carolina Foundation, leaving it with but $211,000, and the decision in the present case have all been arrived at without consideration of the quasi-cy pres limitations incorporated in the N-PCL sections discussed above. It is still possible, of course, for the court in the dissolution proceeding to consider whether the North Carolina Foundation is “engaged in activities substantially similar to those of” defendant Foundation. But the issue before us is the propriety of granting defendant summary judgment dismissing the complaint in the present action. As to that we conclude that an amendment of the charter of a Type B corporation which changes the purpose to which funds received by it for a limited purpose may be applied is not within the discretionary authority of the trustees alone; rather, such a change must be reviewed by a Justice of the Supreme Court under the quasi-cy pres provisions discussed above before such an amendment can be approved.9 Defendant’s motion for summary judgment should, therefore, have been denied.
*471We do not reach or decide whether, upon such review, the amendment sought to be made by the trustees should be approved, that question being one which normally involves a large measure of discretion (City Bank Farmers Trust Co. v Arnold, 283 NY 184, 195; Sherman v Richmond Hose Co., 230 NY 462, 473; Matter of Richmond County Socy. For Prevention of Cruelty to Children, 11 AD2d 236, 239, affd 9 NY2d 913, appeal dismissed and cert denied 368 US 290).
For the foregoing reasons the order of the Appellate Division should be modified as above set forth and, as so modified, affirmed, with costs to plaintiffs.
. Type B corporations “may be formed for any one or more of the following non-business purposes: charitable, educational, religious, scientific, literary, cultural or for the prevention of cruelty to children or animals” (N-PCL 201 [b]).
. A further ground for dismissal as to the corporate plaintiff was that the New Jersey decision having been appealed, there was another action pending. The parties’ briefs inform us that dismissal of the New Jersey action was affirmed on August 6,1984 and do not indicate that a further appeal ensued. Accordingly, we deem the other action pending ground moot.
. The Foundation’s petition for approval of its plan of dissolution and the distribution of its assets begun by order to show cause served upon plaintiffs and the Attorney-General and returnable October 5, 1983, remains pending, apparently awaiting determination of the present appeal. In light of the conclusion reached by us, consolidation of that proceeding with this action would appear to be in order.
. Giving such notice appears particularly appropriate in view of the interrelationship between the charter amendment and the dissolution and would facilitate consolidation of the dissolution proceeding with this action.
. Defendant does not dispute that its funds, obtained by inter vivos gift from Joseph Knapp, were to be used only for the purposes stated in the special act by which it was created in 1923, as amended in 1927 (see, Lefkowitz v Lebensfeld, 51 NY2d 442, 446; Sherman v Richmond Hose Co., 230 NY 462).
. This is the statutory codification of cy pres (see, Greenfield, Practice Commentary, McKinney’s Cons Laws of NY, Book 17B, EPTL 8-1.1,1984-1985 Pocket Part, pp 167-169; 18 NY Jur 2d, Charities, § 48, at 232).
. The apparent contradiction between section 513 (a)’s direction that the corporation “shall not be deemed a trustee of an express trust” and the incorporation of cy pres doctrine in the N-PCL appears to be explained by the January 13, 1969 Memorandum of the Joint Legislative Committee to Study Revision of Corporation Laws (reprinted in McKinney’s Cons Laws of NY, Book 37, Not-For-Profit Corporation Law, p XV): “The case law giving charitable corporations full ownership of property received by them in trust for a corporate purpose is codified * * * The board is under a duty to apply such funds in accordance with the directions of the donor, but within the framework of the corporation law rather than the trust law.” The case law referred to is St. Joseph’s Hosp. v Bennett (281 NY 115, 123), which held that, “The charitable corporation is not bound by all the limitations and rules which apply to a technical trustee. It may not, however, receive a gift made for one purpose and use it for another, unless the court applying the cy pres doctrine so commands.” That this was the legislative intent see Legislative Studies and Reports (McKinney’s Cons Laws of NY, Book 37, Not-For-Profit Corporation Law §513, p 162) which states: “This section codifies St. Joseph’s Hospital v Bennett, 281 N.Y. 115, 22 N.E.2d 305 (1939), but goes beyond that decision in providing the framework for administration of such assets within the principles of the corporation law rather than the trust law. Even if trust language is used in the conveying instrument, the receiving corporation acquires full ownership of the fund or property, subject to the duty of the directors to follow the directions of the donor.”
. The January 13, 1969 Memorandum of the Joint Committee to Study Revision of Corporation Laws (reprinted in McKinney’s Cons Laws of NY, Book 37, Not-For-Profit Corporation Law, p XXII) states that, “This is a codification of the ‘cy-pres’ doctrine”; the March 8,1969 Memorandum of the Joint Committee (reprinted in McKinney’s Cons Laws of NY, Book 37, p XXXIII) states that: “The ‘cy-pres’ provision in section 1004 (a) (3) (A) [szc, should read 1005] of the proposed bill has been clarified to apply to assets received and held by the corporation for a purpose specified as Type B in paragraph (b) of section 201 or which are legally required to be used for a particular purpose (section 1005 (a) (3) (A)). These purposes would normally be of a charitable or trust character. A similar adjustment has been made in section 1008 (a) (15) which vests cy-pres power in the supreme court”; and the comment in the annotation to section 1005 under Legislative Studies and Reports (McKinney’s Cons Law of NY, Book 37, pp 425-26) refers to assets held for a Type B purpose or which are legally required to be used for a particular purpose as “ ‘cy-pres’-type assets.”
. Thus the dissent is simply in error in suggesting that we have held “the Foundation’s actions unreasonable, as a matter of law” (dissenting opn, p 475) or deprived “a not-for-profit corporation of the power to change its corporate purpose” (p 476). It also errs in that (1) by express provision of N-PCL 103 (c) that section insulates the interpretation of applicable law by the board of a Type B corporation only “unless and until a court determines otherwise”; (2) the instant case does not involve an interest “held for private beneficiaries” of which a not-for-profit corporation is a remainderman, but rather is one in which the only fund', ui the corporation were received by it as a present gift *471subject to the limitation that they be used for the benefit of a specified and limited class of persons; (3) N-PCL 522 (c) only limits a use that would be ultra vires; it does not foreclose a use permissible under an amended charter which is within the donor’s original purpose, or, though beyond that original purpose, has been made permissible by application of cy pres (522 [d]); (4) nothing in the statute or its legislative history indicates an intent, as suggested in footnote 1 of the dissent, to apply sections 513 and 522 only to gifts subsequent to the original gift; and (5) if, as the dissent argues, a charter amendment can authorize a dissolution which entirely frees the donor’s funds of his stated purpose, the provisions of N-PCL 1005 (a) (3) (A) and 1008 (a) (15), which limit use of such funds in the hands of the acquiring corporation unless a New York court in the exercise of its cy pres function authorizes otherwise, are rendered meaningless.