
364 Pa. 248 (1950)
Wanamaker Estate.
Supreme Court of Pennsylvania.
Argued January 6, 1950.
March 20, 1950.
*249 Before MAXEY, C.J., DREW, LINN, STERN, STEARNE and JONES, JJ.
J. Willison Smith, Jr., with him Samuel L. Sagendorph, for The Bethany Collegiate Presbyterian Church and Bethany Brotherhood, appellants.
Robert W. Sayre, for Fidelity-Philadelphia Trust Company, appellee.
Edward S. Morris, for The Big Brother Association, appellant (No. 201), appellee (No. 200).
Philip A. Bregy, with him Richard Hay Woolsey, for The Salvation Army, appellee.
Joseph T. Coghlan, Jr., Assistant City Solicitor, with him Frank F. Truscott, City Solicitor, for City of Philadelphia, appellee.
*250 OPINION BY MR. JUSTICE HORACE STERN, March 20, 1950:
We are concerned in this case with circumstances which require the application of the doctrine of cy pres.
The 17th paragraph of the will of John Wanamaker, who died in 1922, provided as follows: "I give and bequeath unto the Trustees of the General Assembly, of the Presbyterian Church, in the United States of America, In Trust, the following sums of money. Two Hundred Thousand Dollars, for the use of Bethany Collegiate Presbyterian Church, of the City of Philadelphia.. . . Ten Thousand Dollars, for the use of Bethany Dispensary, connected with said Church. Fifty Thousand Dollars, for the use of Bethany Brotherhood, connected with said Church. Fifty Thousand Dollars, for the use of the Friendly Inn. . . ."
The 33rd paragraph of the will was as follows: "Should my said Residuary Estate be more than sufficient to create said Trust Fund of Two Million ($2,000,000.00) Dollars, for the benefit of my daughters, as aforesaid, and the payment of the legacies I have directed should be paid, and the payment of the sum to the Williamson Free School of Mechanical Trades, in case said latter sum should be accepted by the Trustees of said School, . . . then I order and direct said balance of said Residuary Estate . . . shall be paid over to the Testamentary Trustees, hereinafter named, their survivor, to be distributed by them, according to their best judgment, . . . giving preference; 1st to the building of a memorial Headquarters for the Salvation Army, in Philadelphia, . . . to an amount not exceeding Five Hundred Thousand Dollars, 2nd, to the building of a Home for Boys, in the City of Philadelphia, whose misdeameanors have subjected them to the Law, and, for want of any other place are disgraced by being committed to the House of Correction, and other Institutions, that there may be a proper place for temporary *251 detention, at the discretion of the Judges of the Courts, who desire to take merciful cognizance of a foolish boy who was led into mischief, or crime, without knowing where he was going."
Two of the above bequests were revoked by a codicil,  the one to the Bethany Dispensary, which had ceased to exist, and the one for the building of a memorial headquarters for the Salvation Army, for which a substitutionary provision was made. The Trustees of the General Assembly of the Presbyterian Church declined to act as trustee under the 17th paragraph of the will and the Fidelity-Philadelphia Trust Company became the substituted trustee.
Due to complications in the administration and liquidation of Mr. Wanamaker's estate and the uncertainty of the ultimate amount that would be realized from its assets all the parties in interest executed in 1932 an agreement of compromise and settlement under which the Bethany Collegiate Presbyterian Church received somewhat over sixty per cent of its $200,000 legacy and the Bethany Brotherhood and the Friendly Inn each received a similar percentage of their respective legacies of $50,000; by the terms of this same agreement there was created a fund of approximately $32,000 for the purpose of carrying out the testamentary provision for the building of the Home for Boys. The latter sum being obviously inadequate for the erection of such a building, the orphans' court granted a petition of the testamentary trustees for a cy pres award of the fund. After considerable testimony was submitted at hearings before a Master, the court selected the City of Philadelphia as the beneficiary, the money to be used by it for the purpose of providing certain additional facilities at Pennypack House, which is a project of the City's Department of Welfare. From this award there are now two appeals, one by the Bethany Collegiate Presbyterian *252 Church and the Bethany Brotherhood, the other by an organization known as The Big Brother Association.
That it was proper to apply the doctrine of cy pres to the situation arising from the inadequacy of the fund for the exact purpose designated by the testator is beyond question. It is clear that the implementation of his desire to provide a place for the temporary detention of youthful misdemeanants was, to him, paramount in importance to its being accomplished in the particular manner which he specified, namely, by the building of a new structure, under which circumstances the charitable trust which he created must be executed cy pres and not be allowed to fail altogether: City of Philadelphia v. Heirs of Stephen Girard, 45 Pa. 9, 27, 28; Wilkey's Estate, 337 Pa. 129, 132, 133, 10 A. 2d 425, 427; Restatement, Trusts, § 399. The only question now before us is whether the beneficiary selected by the orphans' court is the one best fitted to meet testator's purpose as gleaned from the provisions of his will.
It is the position of the Bethany Collegiate Presbyterian Church and the Bethany Brotherhood that the fund should have been awarded to them, not because of any claim on their part that they furnish custodial care to delinquent boys, but merely because they did not receive the full amounts of their legacies under the will. At a hearing before the Master their counsel frankly stated: "We do not claim as one providing a home. We claim as a legatee who has not been fully taken care of, or paid out of the funds, and we think we precede the residuary legatee, and before going outside to find an object of cy pres we ought to take care of the objects that Mr. Wanamaker himself specified. . . . Our position is that we should be paid in full before other objects are brought in for the application of cy pres." There is no merit in this contention. Under the agreement to which they were parties (being represented therein by their substituted trustee acting in pursuance of their express *253 authority) these appellants accepted certain sums in full settlement of their rights under the will; the agreement expressly provided that "The execution of this document by the parties hereto is to be considered as in compromise and settlement of all claims of whatsoever nature". By the same agreement there was established the fund here in question to cover the bequest of the building for the Home for Boys and which is now being applied to that purpose, not, it is true, in the exact manner specified by the testator, but in the execution of his general intention underlying the gift. When a court applies the doctrine of cy pres it is not thereby arbitrarily substituting a beneficiary in place of the one designated by the testator, nor is it substantially altering the testamentary intent; on the contrary, it is carrying out that intent in its broader outlines in accordance with the testator's more fundamental wishes as the court interprets them. Apart from any other reason the present claim of these appellants is barred by their participation in the settlement agreement of 1932.
The appeal of The Big Brother Association is based upon the proposition that it, and not the City of Philadelphia, is entitled to the fund; it claims that it measures up more closely to the testator's specifications. That the Big Brother Association is, in every respect, a most worthy institution is conceded by all. It was incorporated for the purpose of assisting boys in need of the friendship and guidance of "elder brothers"; the boys are referred to it by the Juvenile Division and Misdemeanants Division of the Municipal Court, by the city schools, and by social agencies; ordinarily it handles only boys under 16 years of age, not necessarily offenders against the law, but boys who, perhaps, have shown unruly tendencies in school or at home and need some outside influence for their social readjustment or moral improvement. The Association operates a clubhouse where the delinquents mingle with everyday normal *254 boys and where they can take part in athletic activities, work in shops, or attend music and art classes; it also operates a boys' summer camp. Its weakness, however, as a claimant in the present case, lies in the fact that it does not provide a place of detention; it is not equipped to give, nor does it pretend to give, any institutional or custodial care; it has no building or facilities for that purpose. It would seem to be generally admitted that although modern theories of social welfare work favor, in most instances, home environment over institutional care, nevertheless enforced detention is necessary for certain types of delinquent children, and what the present testator provided for in his will was the building of a Home for temporary detention of boys whose misdemeanors had subjected them to the law,  a Home which was to serve, instead of the more forbidding House of Correction, as a place to which they could be committed by the courts. With that in mind the court below approved the award of this fund to the City of Philadelphia, to be used for the building of better dormitory and dining facilities at Pennypack House. To that institution, located on a tract of 25 acres, the Juvenile Division of the Municipal Court commits boys over the age of 16,  boys guilty of minor offenses or misdemeanors as distinguished from the more serious crimes which would require their commitment to a State penal institution. It is a modern structure and a large part of the grounds surrounding it are set aside for recreational purposes; there are also classrooms and workshops; the boys receive medical attention and spiritual guidance; their parents are encouraged to visit them and to keep in touch with the teachers at the institution; after they are apparently rehabilitated  ordinarily after a three months' period  the Municipal Court usually releases them on probation. The buildings and grounds of Pennypack House are not enclosed by walls or fences and have none of the appearance of a reformatory; it is *255 an institution of minimum restraint and is not administered with the rigid discipline of the House of Correction. The one disadvantage under which it presently suffers is that, because of its existing inadequate facilities, the boys are obliged to take their meals in a dining room in the adjacent House of Correction and to sleep there in one of the wings. The very purpose, however, of its acquiring the present fund is to erect a dormitory and provide a dining room that will eliminate the necessity of the boys having any physical contact whatever with the House of Correction. Accordingly the court awarded the legacy to the City of Philadelphia "conditioned upon City Council appropriating sufficient money, which together with said fund will provide sleeping and dining facilities at Pennypack House, and conditioned also upon the management being separate from that of the House of Correction; the City being required to take the necessary steps to meet these conditions on or before December 31, 1952. If met, upon application to the City Solicitor, an appropriate final decree awarding the fund will be entered. If the City of Philadelphia does not meet these conditions within the time fixed, an award will be made to the Big Brother Association. The fund to remain in the hands of . . . [the substituted] Trustees, until further order of the court." This was not only a legally proper, but a wise application of the fund in accordance with the cy pres doctrine; it was an award that best complied with the conditions prescribed in the will.
Another question that has arisen is in regard to the bequest in the 17th paragraph for the use of the Friendly Inn. That institution conducted a "hotel" for the housing and feeding of homeless men. Under the agreement of 1932 the fund available for the payment of its legacy was fixed at approximately $30,000, but two years later then remaining portion of the fund amounted to about it ceased to function because of financial difficulties; the *256 $8,000. The Fidelity-Philadelphia Trust Company, substituted trustee, joined in the cy pres proceedings. Testimony having been presented by the Salvation Army in regard to a men's hotel which it conducts in Philadelphia, the balance of the fund was properly awarded to it for the use of that hotel, the purpose and operations of which closely approximate those of the former Friendly Inn.
The definitive decree of the court below is affirmed; 4/5 of the costs to be charged against the trust under item 33rd of the will and 1/5 against the trust under item 17th.
