The opinion of the court was delivered by
This appeal and cross appeal from a judgment of the Chancery Division primarily involve the question of whether that court properly applied the doctrine of cy pres to the terms of a trust established by the will of C. Edward McKinney, Jr. Mr. McKinney, a resident of the City of East Orange, died on October 21, 1957. His will, admitted to probate by the Surrogate of Essex County on November 6, 1957, designates the plaintiff, the Howard Savings Institution, as executor and provides in part as follows:
“Thirtieth: I give and bequeath the sum of Fifty Thousand Dollars ($50,000) to Amherst College, an institution of learning, situate at Amherst, Massachusetts, to be held in trust to be used as a scholarship loan fund for deserving American born, Protestant, Gentile boys of good moral repute, not given to gambling, smoking, drinking or similar acts. (It being my thought that if a young man has enough funds to allow the waste of smoking, he certainly does not need help.) The money loaned from said fund is to be repaid to the fund at the earliest moment so that others may benefit from its use.
Thirty-third: All the rest, residue and remainder of my estate, real, personal and mixed, of whatsoever kind and wheresoever *498situate, of which I shall die seized or possessed, I give, devise and bequeath unto Amherst College aforesaid to be held on the same trusts as mentioned in paragraph Thirtieth aforesaid.”
The charter of Amherst College provides that “no student shall be refused admission to, or denied any of the privileges, honors, or degrees of said College, on account of the religious opinions he may entertain.” On June 7, 1958 the Board of Trustees of Amherst College adopted a resolution stating that it believed acceptance of a trust discriminating among students on religious grounds would contravene the letter and spirit of the charter and the policy of the college. Accordingly, the Board declined to accept the trust funds unless the Protestant-Gentile restriction was eliminated from the terms of the trust. Plaintiff-executor thereupon instituted this action to obtain judicial construction of paragraphs Thirty and Thirty-three of Mr. McKinney’s will and conformable instructions. It joined as defendants the Board of Trustees of Amherst, the Attorney General of Kew Jersey, and the next-of-kin of the testator.
The Chancery Division, applying the doctrine of cy fres, entered a judgment excluding the words “Protestant” and “Gentile” from paragraph Thirty of the will and ordering the executor to turn the trust funds over to Amherst to be administered in accordance with the remaining terms and conditions of the will. 61 N. J. Sufer. 119 (1960). We certified the appeal of the executor and the cross appeal of the next-of-kin before argument in the Appellate Division.
At the outset, the Board of Trustees of Amherst disputes the executor’s standing to appeal. In a sense the Board’s argument is moot, since all parties concede that the next-of-kin have standing to cross-appeal, and to resolve the issues raised by the next-of-kin we must consider whether, as the executor argues, the Chancery Division should have appointed a substituted trustee, nevertheless, the argument raises a point of law which should be resolved for the future guidance of the bench and bar.
*499 Only a party aggrieved by a judgment may appeal therefrom. Green v. Blackwell, 32 N. J. Eq. 768 (E. & A. 1880); In re Atlantic City, 3 N. J. Super. 62 (App. Div. 1949). It is the general rule that to be aggrieved a party must have a personal or pecuniary interest or property right adversely affected by the judgment in question. In re Lent, 142 N. J. Eq. 21 (E. & A. 1948); Eugster v. Eugster, 89 N. J. Eq. 531 (E. & A. 1918); Swackhamer v. Kline’s Administrator, 25 N. J. Eq. 503, 505 (Prerog. 1874). The Board argues that the executor has no interest in its own right which is adversely affected because it will be fully protected in making distribution as directed by the judgment of the Chancery Division, and that it has no representational interest because all other affected persons are adequately represented in the action—the next-of-kin by their counsel and the only other possible interests by the Attorney General.
An executor has the duty to see that the estate is distributed in accordance with what he believes are the wishes of the testator. Pursuant to that duty, he may in appropriate circumstances ask a court to construe the will. But there is no reason why the executor should be bound by the decision of a lower court if it believes that that court’s decision will not accurately effectuate the testator’s intent. As expressed by the New York Appellate Division: “the fact they [the executors] asked for a construction does not bind them to accept any construction they get, right or wrong.” In re Smith’s Will, 9 A. D. 2d 583, 584, 189 N. Y. S. 2d 331, 332 (App. Div. 1959). We think that under the circumstances the executor is entitled to a definitive judgment by an appellate court, and we therefore hold that it has standing to prosecute this appeal as the representative of the testator. See Drewen v. Bank of Manhattan Co. of City of N. Y., 31 N. J. 110 (1959); 7 New Jersey Practice, Clapp, Wills & Administration § 981, p. 585 (1950).
*500The executor has standing to prosecute this appeal for an additional reason. The interests of Protestant-Gentile boys who might qualify for a scholarship loan under the terms of the trust have been diluted or adversely affected by the judgment below. Neither the next-of-kin nor the board represent those interests; for both have taken a position contrary thereto. The board argues that all unknown persons who might benefit under the trust are represented by the Attorney General. This is an unrealistic assertion. The Attorney General represents the public interest in a charitable trust rather than a particular class of potential beneficiaries. Indeed, in the present case, the Attorney General did not adopt any position as to how the doctrine of cy pres should be applied, and declined to appeal from the judgment below on the ground that the general charitable interest and the divergent views with regard to that interest are adequately represented by the other counsel. Since Protestant-Gentile boys who might qualify for loan aid have been adversely affected by the judgment below and would otherwise be unheard, the executor may appeal on their behalf. See Green v. Blackwell, supra.
This brings us to the merits of the case. No one urges on this appeal that the Protestant-Gentile restriction or its enforcement by the court offends public policy or the Fourteenth Amendment to the Federal Constitution. Hence, we have no occasion to express a view as to those issues. See Clark, “Charitable Trusts, the Fourteenth Amendment and the Will of Stephen Girard,” 66 Yale L. J. 979 (1957); Miller, irRacial Discrimination and Private Schools,” 41 Minn. L. Rev. 145 (1957).
We first consider whether the Chancery Division should have applied the doctrine of cy pres to the terms of the trust. The doctrine of cy pres is a judicial mechanism for the preservation of a charitable trust when accomplishment of the particular purpose of the trust becomes impossible, impracticable or illegal. In such a situation if the settlor manifested an intent to devote the trust to a *501charitable purpose more general than the frustrated purpose, a court, instead of allowing the trust to fail, will apply the trust funds to a charitable purpose as nearly as possible to the particular purpose of the settlor. Wilber v. Owens, 2 N. J. 167, 177 (1949); Restatement, Trusts § 399 (1935). Three observations about the doctrine may aid analysis of its applicability to the facts of the present case. Eirst, the term “general charitable intent” ordinarily used by courts articulating the doctrine does not require an intention to benefit charity generally. It requires only a charitable purpose which is broader than the particular 'purpose the effectuation of which is impossible, impracticable or illegal. Sheridan & Delaney, The Oy-Pres Doctrine (1959); Restatement, Trusts § 399, comment c, p. 1211 (1935). Second, the inquiry “did the settlor manifest a general charitable intent” is just another way of asking “would he have wanted the trust funds devoted to a like charitable purpose, or would he have wanted them withdrawn from charitable channels.” 4 Scott, Trusts § 399, p. 2824 (1956). So stated, it can be seen that cy pres is an intent-enforcing doctrine. But it is well to keep in mind that it is a surmised rather than an actual intent which the courts enforce through application of the doctrine. Rarely does a settlor contemplate the possible non-fulfillment of his precise purpose. Therefore, the court must make an educated guess based on the trust instrument and relevant extrinsic evidence as to what he would have intended had he been aware of the contingency which has frustrated the exact effectuation of his expressed intent. 2A Bogert, Trusts & Trustees § 436, p. 344 (1953). And third, recognizing the social benefit deriving from the devotion of property to charitable purposes, courts ascertaining a settlor’s surmised intent are guided by the policy of preserving charitable trusts whenever possible and by the established presumption against partial intestacy. Mirinda v. King, 11 N. J. Super. 165, 173 (App. Div. 1951) and cases cited therein. See Comment, “Revaluation of Cy Pres,” 49 Yale L. J. 303 (1939).
*502Similar to, but distinct from, cy pres is the doctrine of deviation from the terms of a trust. Applicable to private as well as charitable trusts, the doctrine of deviation comes into play when compliance with an administrative provision of the trust is impossible, illegal or in conflict with the essential purpose of the trust. Bogert, op. cit. supra, § 561 (2d ed. 1960); 2 Scott, op. cit. supra, § 167; Restatement, Trusts § 167 (1935). In such a situation, a court, pursuant to its general equity power, may allow modification of the provision. The doctrine is commonly applied, for example, to appoint a substituted trustee when the trustee designated by the settlor cannot or will not serve. E. g., Martin v. Haycock, 140 N. J. Eq. 450 (Ch. 1947). Essential to application of the doctrine of deviation is a finding that the term of the trust to be deviated from is an administrative one—that is, that it is not essential to fulfillment of the settlor’s scheme. See Martin v. Haycock, supra. This finding, in turn, depends on an interpretation of the settlor’s intent. Ultimately, therefore, applicability of the doctrine of deviation, like the doctrine of cy pres, depends on what the court concludes the settlor would have wanted to happen if he were aware of the contingency which has made the exact effectuation of his expressed intent impossible.
"With the above principles in mind, we return to the question of whether the Chancery Division should have disposed of the trust funds in the present case as it did.
We first consider the next-of-kin’s contention that the doctrines of cy pres and deviation are inapplicable to the trust established by Mr. McKinney’s will and that therefore the Chancery Division should have declared an intestacy. The next-of-kin’s initial argument is that the bequest provided for in paragraphs Thirty and Thirty-three is not a charitable trust. Thej'' do not quarrel with the well-settled proposition that a trust for the advancement of learning is charitable. Wilber v. Owens, supra, 2 N. J., at p. 174; MacKenzie v. Trustees of Presbytery of Jersey City, 67 N. J. Eq. 652, 665 (E. & A. 1905). Instead, they rely on *503the rule that to be characterized as charitable, a trust, regardless of its purpose, must encompass a sufficient number of beneficiaries to warrant a community interest. 4 Scott, op. cit. supra, § 375. In order to qualify for scholarship loan aid under Mr. McKinney’s will, an Amherst student must be an American born Protestant-Gentile, not given to gambling, smoking, drinking or similar conduct. The next-of-kin assert, and ask us to take judicial notice of, the fact that in light of contemporary social conditions and mores, few if any Amherst students could comply with all of the trust requirements. Paragraph Thirty is not so worded that an isolated indulgence in the proscribed activities would result in disqualification. The testator said that the beneficiaries are to be boys “not given to” smoking, drinking, etc. “Given to” is ordinarily defined as meaning “disposed; inclined; addicted; * * * as, given to drink.” Webster’s New International Dictionary (2d ed. 1959). It implies at least some degree of regular indulgence. This construction is confirmed by the testator’s parenthetical observation: “It being my thought that if a young man has enough funds to allow the waste of smoking, he certainly does not need help.” It is obvious that the testator had in mind a person who is so committed to the act of smoking that it becomes a financial drain. Presumably, there are and will be at Amherst enough American born Protestant-Gentiles who do not regularly smoke, drink, gamble or engage in similar conduct, and who thus fall within the class of potential beneficiaries to justify categorizing the trust as charitable. We think that there is a sufficiently broad classification combined with Mr. McKinney’s worthy purpose to warrant that appellation. See Glarh, op. cit. supra, at p. 998. In any event, we have no information which would merit our taking judicial notice to the contrary. Accordingly, we hold that paragraphs Thirty and Thirty-three of Mr. McKinney’s will establish a charitable trust.
The next-of-kin also argue that the Chancery Division erred in applying the doctrine of cy pres because the testator *504had no general charitable intention. He had, they say, a particular, unitary and inseparable purpose of benefiting Protestant students at Amherst; he was equally interested in Protestantism and the college. Therefore, they contend, since the testator’s intent cannot be effectuated exactly as expressed, the funds must pass by intestate succession.
As mentioned above, in ascertaining the existence of a general charitable intent the court must determine whether the testator would have wanted the trust funds to remain devoted to a charitable purpose similar to, but not the same as, he provided, or to go to his next-of-kin. Eor the answer, we must first look to the will. A provision for reverter or gift over upon failure of the particular trust purpose or the designation of heirs or other persons as residuary legatees may evidence absence of a general charitable intent. Cf. Bankers Trust Co. v. N. Y. etc., Animals, 23 N. J. Super. 170 (App. Div. 1952); see also 6 New Jersey Practice, Clapp, Wills & Administration, § 275, p. 34 (1950). On the other hand, if there are no such provisions or if he has specifically provided for all his heirs and indicated that was all he wanted to bestow upon them, or if he has expressly declared he is not interested in his heirs, then it would seem that he had no desire to withdraw the trust funds from charitable channels. Comment, 39 Yale L. J., supra, at p. 318.
The will in the present case strongly indicates that Mr. McKinney would not have wanted his next-of-kin to receive the trust funds. There is no provision in paragraphs Thirty and Thirty-three for reverter or a gift over if the trust bequest cannot be carried out in its exact terms. By contrast, the testator provided in paragraph Ninth of the will that if a trust bequest to the Town of Wolfeboro established therein could not be carried out in accordance with its exact terms, it should fail. A comparison of the charitable bequests to Amherst and the Town of Wolfeboro suggests a wholly different intent of the testator as to his willingness to accept some modification of their exact terms. If he had been opposed to any modification in the terms of the bequest *505to Amherst, it is reasonable to assume that he ‘would have said so, just as he did in the Wolfeboro bequest. Additionally, we note that neither the next-of-kin nor other persons are designated as residuary legatees. Indeed, the residuary legatee is Amherst College under paragraph Thirty-three of the will. Moreover, the testator made specific legacies in varying amounts to twenty different persons, and did not include his next-of-kin. It is apparent from these detailed provisions that he executed his will after careful consideration and did not want his next-of-kin to share in his estate.
Evidence extrinsic to the will confirms the foregoing conclusion. The testator had no close relatives. He left no spouse or descendants or parents or brothers or sisters. His surviving kin are two cousins and a cousin of his mother. These persons lived distant from testator’s home, and there is no evidence that he had any personal contact with them. Indeed, he expressly said that they were not to share in his estate. In a memorandum of instructions for the use of his scrivener in the preparation of the will the testator states in four separate places: “I have no immediate relatives, and any others omitted are either well-fixed financially or deliberately omitted for reasons very well known to themselves.”
The aforementioned facts in and out of the will compel the conclusion that the Chancery Division properly found that the testator had a general charitable intent in the sense that he would have preferred to retain the charitable bequest —though in modified form—rather than leave the money to his cousins.
This brings us to the question of whether the Chancery Division correctly applied the doctrine of cy pres. Eirst, we consider the executor’s argument that the testator’s intent can be fully effectuated by turning the funds over to another educational institution willing to honor the Protestant-Gentile restriction. This argument is based on the premise that the testator’s intent was to benefit needy Protestant students, and that Amherst was designated trustee *506merely for administrative purposes. We think that the executor’s argument is based on a faulty premise.
The very nature of the bequest indicates that the testator was interested in benefiting Amherst as well as the recipients of scholarship loans. A donor interested in benefiting only students presumably would make funds available to them regardless of what institution they wished to attend. But Mr. McKinney’s will envisions as recipients only those students, who, meeting the other qualifications of the trust, are present or prospective members of the Amherst student body. A scholarship loan program, identified with a particular institution, inevitably benefits that institution by making available to it funds to attract and hold outstanding students. Cf. Deubel v. Kervick, 33 N. J. 568, 576 (1960). It is reasonable to conclude, therefore, that the creator of such a program intended to benefit the college identified therewith. That Mr. McKinney also intended to benefit the unknown student recipients of loans does not diminish at all his purpose of advancing the interests of Amherst. The foregoing shows, we think, that Amherst was designated trustee for more than mere administrative reasons. But this conclusion does not alone answer the executor’s argument. Amherst will not accept the trust if it must enforce the Protestant-Gentile restriction. The question therefore is, would Mr. McKinney rather have the trust remain at Amherst with the restriction eliminated, or would he have preferred that the funds be turned over to another institution with the restriction? The facts indicate that Mr. McKinney was more interested in benefiting Amherst and its needy students than he was in Protestantism.
Mr. McKinney was a graduate of Amherst who continuously manifested an interest in the college. According to the records of contributions to the Alumni Eund which begin with the year 1932, the testator contributed to such fund in 1932 and every succeeding year until his death. In addition, he attended the 50th, 55th and 60th reunions of his graduating class in 1946, 1951 and 1956 respectively. *507(Amherst College has no record of the attendance of members of his class at previous reunions.) On the other hand, there is no evidence in the record that testator was a churchgoer or actively interested in any church activities. In his will he made a bequest of $2,000 to the Board of Congregational Missions in memory of his father, who was born in Ratal, and gave the Board the books in his home to be used in their Ratal Mission. This modest bequest to the mission in memory of his father contrasts markedly with the sum left to Amherst ($50,000) and the designation of Amherst as legatee of the residuary estate (about $150,000). Additionally, the will contains no bequest to any church. Einally, the trust bequest is so worded that the Protestant-Gentile restriction is merely one of a series of qualifications to be met by recipients of scholarship loan aid. Accordingly, we conclude that Mr. McKinney’s primary purpose was to advance the interests of Amherst by making available to it funds for needy students as well as to aid such students, and that to award the funds to another educational institution—if one could be found to enforce the Protestant-Gentile restriction—would contravene that purpose.
The executor further argues that Mr. McKinney’s intent can be best effectuated by appointing a substituted trustee to administer the scholarship loan fund for Amherst students. We disagree because we find that it would be impracticable in the circumstances of this case to have a substituted trustee administer the trust for Amherst. In response to an inquiry from this court as to whether the college could cooperate with a substituted trustee, the Board of Trustees of Amherst adopted and forwarded to us, without objection from any party to this appeal, a resolution which states in pertinent part:
“the policy of Amherst College would be to avoid any involvement whatsoever in the administration of the trust in question. Specifically, the College would in no way participate in identifying, evaluating, or selecting persons who might be beneficiaries of the trust; the College would not use its facilities to publicize the *508trust or otherwise bring its existence to the attention of present or future students; the College would neither solicit nor serve as a depository of scholarship applications; the College would not refer its students or other persons to the trust administrator; the College would decline to serve as an intermediary between the trust administrator and potential or actual candidates for benefits under the trust; the College would not at the behest of the trust administrator provide information concerning the scholastic achievement, character, or financial status of any student or applicant for admission. Upon a student’s direct request, the College would provide information concerning that student, so far as that information may be readily available in the College’s records and so far as its disclosure is consistent with general policies bearing upon confidentiality of the records. A person to whom financial aid has been granted by an outside organization, individual, or trustee would be neither advantaged nor disadvantaged in respect of his becoming or remaining a student at Amherst College.”
It is clear from the above-cited resolution that Amherst believes it cannot tinder its charter cooperate in the administration of the trust if its benefits are confined to Protestant-G-entile students.
Without Amherst’s cooperation the administration of this trust would be so impracticable as to defeat the general purpose of the testator. The substituted trustee would have to be a qualified educator with experience in the allocation of scholarship funds. Even if such a willing trustee could be found, the practical disadvantages are numerous. There would be no feasible way in which the scholarship fund could be used to aid students who are seeking to enter Amherst. Often, the availability of scholarship aid will affect the decision of a needy student to attend a particular college. It would be most difficult for a substituted trustee to know who was applying or considering applying for entrance to Amherst without the cooperation of the college. Thus a class of students and the college would be denied the benefit of what must have been one of the purposes of the trust. If the funds are made available only to matriculated students, the trustee would still face well-nigh insuperable obstacles. He would have to obtain detailed information about a scholarship applicant. Whether an applicant was being considered *509for other aid by the college, for example, would obviously be relevant to a decision to award him aid from the McKinney trust. Then, the award of a scholarship loan involves a delicate weighing of the financial needs of the applicant, his scholastic standing, and his development potential. Moreover, in providing a fund to aid “deserving” boys at Amherst, the testator manifested an essential reliance on the personal discretion of Amherst as trustee. Eor an applicant is “deserving” in a meaningful sense only in relation to the competency and worth of others who seek to enter or remain at the college. Surely Amherst would not violate the trust if it denied aid to a specific applicant or admitted student if it determined another applicant was more “deserving.” Mr. McKinney, therefore, must have contemplated that the merits of loan applications be judged according to those relative standards which Amherst itself may establish to further its conception of what individuals are worthy of membership in its student body. We are unable to understand how any trustee without Amherst’s cooperation can possibly make the comparative value judgment which Mr. McKinney had in mind. Finally, once an award is made, the trustee must have some policing mechanism to assure that the recipient continues to meet the trust qualifications. Determination of whether he deserved a loan renewal would realistically require access to college records and consultations with college instructors and administrators. The above factors clearly show that without the college’s cooperation it would be impracticable, if not impossible, for a substituted trustee to administer the scholarship loan fund for Amherst students.
The executor argues that to apply cy pres because Amherst will not cooperate with a substituted trustee would be to allow the college by its own action to vary the testator’s intent. It cites the rule that a trustee cannot by his own act produce changed conditions which frustrate the donor’s intention and still claim the gift. But the cases so holding are distinguishable from the present case. Typical, is Con *510 necticut College v. United States, 107 U. S. App. D. C. 245, 276 F. 2d 491 (D. C. Cir. 1960). There a testatrix left funds for the construction of a memorial building in a particular location at the United States Military Academy. The Academy declined to erect the building at the proposed site because the location did not accord with its building-expansion program. Instead, it asked to be allowed to use the funds for the construction of a wing on an existing building. The trial judge applied cy pres and awarded the funds to the Academy. On appeal the judgment was reversed on the ground that cy pres cannot be used to vary the terms of a bequest “merely because the variation will meet the desire and suit the convenience of the trustee.” The Court of Appeals emphasized that the refusal of the Academy to apply the funds exactly as prescribed by the testator was not due to circumstances beyond the control of the Academy. In the present case, the refusal of Amherst to accept and administer the trust with the Protestant-Gentile restriction was not merely to serve trustee convenience. The refusal was prompted by the college charter which expressly prohibits the college from denying any privileges of the school to a student because of the religious opinion he may entertain. Clearly, scholarship loan aid is one of those privileges. It seems to us therefore that in the sense required for the application of cy pres, it is impossible for Amherst to accept and administer the trust exactly as desired by the testator. It is as equally clear that college cooperation in the administration of the trust by a substituted trustee would be an indirect violation of the college’s charter.
In view of the fact that Mr. McKinney had a general charitable intent, we hold that the bequest does not fail and the funds do not pass to the next-of-kin. And, in view of the additional facts that Amherst conceives it to be inconsistent with its charter to administer or assist in the administration of the trust so long as its funds are available only to Protestants, and that it would be impracticable for *511a substituted trustee properly to administer the trust, we hold that the testator’s intent can be effectuated as nearly as possible by striking the Protestant-Gentile restriction and turning the funds over to Amherst to be administered in accordance with the remaining terms and conditions of the trust. Of course, striking the Protestant-Gentile restriction does not mean that Protestant-Gentile students will be excluded as beneficiaries of the trust. Any Amherst students who meet the other qualifications set forth in the will will be eligible for scholarship loan aid. Accordingly, the judgment of the Chancery Division is affirmed.