
351 A.2d 554 (1976)
TOWN OF LEE and Lee Academy
v.
TOWN OF LINCOLN et al.
Supreme Judicial Court of Maine.
February 6, 1976.
Eaton, Peabody, Bradford & Veague by Thomas M. Brown, Arnold L. Veague, Bangor, for plaintiffs.
Richard H. Broderick, Peter Briola, Lincoln, Donald J. Gasink, Clayton N. Howard, Asst. Attys. Gen., Augusta, for defendants.
Before DUFRESNE, C. J., and POMEROY, WERNICK, ARCHIBALD and DELAHANTY, JJ.
*555 POMEROY, Justice.
This controversy between the plaintiffs and the defendants[1] results from the conflicting interpretations of the terms of a charitable trust in which both plaintiffs and defendants have an interest.
The legal action taken to resolve the controversy was a complaint for Declaratory Judgment. 14 M.R.S.A. § 5956
The principal question about which the parties disagreed was whether or not Mattanawcook Acadamy has "ceased to exist" within the "gift over" provisions of a charitable trust which presently inures to the benefit of the defendants.
The Justice below to whom the controversy was presented on an agreed statement of facts declared that Mattanawcook Academy had not ceased to exist. This conclusion had the effect of denying the plaintiffs' claim that the trust principal should inure to them because of the "gift over" provision of the trust. The plaintiffs seasonably appealed.
We deny the appeal.
From the agreed statement we learn that in 1928 and 1931 Charles H. and Carrie B. Cobb established and funded two charitable trusts, the pertinent portions of which were for the benefit of the Town of Lee, Lee Academy, and Mattanawcook Academy.
By later agreement the latter beneficiary under the trust instrument was changed to the "Town of Lincoln School District for the benefit of Mattanawcook Academy."
The settlors executed separate memorandum agreements with each of the abovenamed beneficiaries. The agreement with the Town of Lincoln School District provided for the distribution of certain stocks and other securities to the school district upon the death of the settlors "with the intent and purpose that [the] corporation shall hold the same and use the proceeds therefrom, for charitable uses and purposes and particularly for the maintenance and upkeep of the school or academy otherwise commonly known as Mattanawcook Academy;. . ."
The portion of the trust benefiting the Mattanawcook Academy has become known as the "Cobb Fund."
The agreement also contained the following provision:
"In the event the school heretofore known as said Mattanawcook Academy should cease to exist, all property received by second party [Town of Lincoln School District] under the terms of this agreement shall be transferred and paid over in equal shares to the Town of Lee, Maine and Lee Academy, Lee, Maine."
The dispute in this case centers around the meaning of the phrase "cease to exist."
The plaintiffs, of course, contend that the Mattanawcook Academy has ceased to exist and therefore the trust res must be transferred and paid over in equal shares to the Town of Lee and Lee Academy.
Because the trust instrument, which was a memorandum agreement between the settlors and Lincoln School District, contains provision that "[i]t is expressly understood and agreed that this agreement is made subject, in its interpretation and performance, to the laws of the State of California," it becomes necessary to determine what law governs our resolution of the issue.
"Contracting parties, within definite limits, have some rights of choice in the selection of the jurisdiction under whose law their contract is to be governed. And where the donor in a trust agreement has expressed his desire, or if it pleases, his intent to have his trust controlled by the law of a certain state, there seems to be no good reason why *556 his intent should not be respected by the courts, if the selected jurisdiction has a material connection with the transaction." (emphasis supplied) Wilmington Trust Co. v. Wilmington Trust Co., 26 Del.Ch. 397, 24 A.2d 309 (1942) at 313.
Ordinarily, the determination as to what law governs requires analysis and weighing of the interests involved. See, Beaulieu v. Beaulieu, Me., 265 A.2d 610 (1970).
In the case before us the trust involves a Maine trustee, a Maine beneficiary, and Maine school districting laws. On the other hand, settlors were residents of California and the trust instrument was executed by them in that state.
We think that these circumstances are sufficient to require us to respect the stipulation in the memorandum agreement that the laws of California should govern the interpretation of the trust instrument.
However, as a practical matter, it makes no difference because the established law of both Maine and California is that the lodestar by which a trustee must be guided in the administration of a charitable trust is the intention of the settlor as his intention is discerned from the instrument itself and from the circumstances surrounding the execution of the instrument. Traip Academy v. Staples, Me., 317 A.2d 816 (1974); Emphriam v. Metropolitan Trust Co., 28 Cal.2d 824, 172 P.2d 501 (1946).
In order to resolve this conflict between the parties, we must determine what the settlors had in mind when they employed the words "cease to exist" in the agreement creating the trust.
We start our analysis by determining as best we can what the settlors may be presumed to have known about the operation of the academy at the time the trust arrangement was created.
Up until 1933 the academy was a private, nonstock corporation governed by a board of trustees. Arrangements existed with the Town of Lincoln whereby all secondary students in the town could be educated at the academy, the town being obligated to pay the students' tuition and certain other expenses.
By 1933 the school had become greatly overcrowded. In recognition of that fact, legislation was passed authorizing the formation of the Town of Lincoln School District, which body was empowered to issue bonds and notes in order to procure funds for the construction and maintenance of a larger high school. Private & Special Laws of Maine, 1933, c. 73. The legislation further provided for the termination of the Lincoln School District and conveyance of the building so established to the Town of Lincoln upon retirement of the construction debt.
Pursuant to that legislative scheme, the trustees of Mattanawcook Academy conveyed the property to the Town of Lincoln, and a new facility called the Mattanawcook Academy was constructed on the site of the old school. This facility was completed in the fall of 1933.
Since the original trust indenture was amended to make the Town of Lincoln School District beneficiary and since the memorandum of agreement between the settlors and the Lincoln School District was dated June 13, 1934, it can be assumed that the Cobbs were aware that a new academy building had been constructed and that all secondary students in the town were to benefit therefrom.
No further action was taken regarding the trust until the death of Mr. Cobb in 1942. At that time the moneys in the "Cobb Fund" were transferred to the Town of Lincoln School District as specified in the agreement.
In 1952 the debt incurred by the school district was retired, at which time the district was dissolved. The duties of management and administration of the "Cobb *557 Fund" were assumed by the municipal officers of the Town of Lincoln.
In 1968 the Town of Lincoln voted pursuant to 20 M.R.S.A. c. 9 to join with the towns of Chester and Mattawamkeag in the formation of a school administrative district. Shortly thereafter, the proposed district (School Administrative District No. 67) was formed and assumed the responsibility for the management of all public schools within the district.
In 1969 the two high schools in the district were consolidated into one, utilizing the facilities of the Mattanawcook Academy building constructed in 1933.
In 1974 School Administrative District No. 67 commenced construction of a new high school (grades 9 through 12), at the completion of which the Mattanawcook facility is to be converted into a junior high school serving all the students in the district in grades 6 through 9. It is this proposed change which appellants assert should trigger the "gift over" provisions of the Cobb trust.
Since they made provision for a "gift over" on the cessation of Mattanawcook Academy, it will be assumed that the Cobbs had certain features of the school in mind which they wished to see perpetuated and which, if not sustained, would cause a shift in beneficiaries.
The problem is best approached by considering first what features the Cobbs probably would not regard as important.
It is apparent from the language of the agreement that the trust did not depend on continued use of the name "Mattanawcook Academy." Each time the school is mentioned in the agreement, it is referred to as "the school heretofore known as Mattanawcook Academy" or "the school or academy otherwise commonly known as Mattanawcook Academy." This language clearly indicates to us that the name of the school to be endowed was not a critical feature.
Obviously also, the Cobbs could not have meant to benefit only those persons who attended or were taught at the school at the time the trust was established.
Nor does it appear that the settlors regarded as critical the continued use of the academy building itself. The Cobbs were certainly aware that the old academy building had been torn down and replaced, and there is no reason to believe that they developed any particular attachment to the 1933 structure.
By the same token, there is nothing to suggest that the Cobbs would deem fatal a change in the location of the school as long as students from Lincoln continued in attendance.
As we view it, the decision in this case turns on whether the settlors would regard the administrative changes which have taken place in the Town of Lincoln (formation of School Administrative District No. 67 and the inclusion of students not from Lincoln in the new high school) as constituting a cessation of Mattanawcook Academy.
Such a determination is not easily made.
There is little guidance in the case law. See, Annot., 152 A.L.R. 1303 (1944).
In one case, In Re Hagan's Will, 234 Iowa 1001, 14 N.W.2d 638 (1944), "cease to exist" as it applied to a college which had been taken over by a new corporation and renamed was construed to mean "cease to exist as an educational institution." The Hagan court explained:
"If testatrix had intended a mere change in name of the college or in its ownership and operation to terminate its right to a share of the trust income, she could easily have so stated. . . . It is extremely improbable that she was concerned with maintaining inviolate the precise name of the institution or the identity of the corporation that owned and managed it." 14 N.W.2d at 642.
*558 In Guilford Trust Company v. La Fleur, 148 Me. 162, 91 A.2d 17 (1952), a trust for the benefit of Guilford High School was held not to have failed when the Town of Guilford joined with three other communities to form the Piscataquis Community School District. This Court said:
"There is nothing in the will of Mr. Appleyard to indicate that his gift was limited to an institution at a particular location. The point is that the present high school, wherever located, is in fact and law the official secondary school of Guilford and it is this school, whatever its name, which the testator had in mind in naming the Guilford High School.
". . . To say that the gift must fail because of the change of name and the extension of the area supporting the school would, in our view, give undue weight to a relatively unimportant matter." 148 Me. at 169-170, 91 A.2d at 20.
In contrast, in Curators of Univ. of Missouri v. Univ. of Kansas City, Mo., 442 S. W.2d 66 (1969), the Missouri court found that the University of Kansas City had "ceased to exist" within the meaning of a trust established for its benefit when it transferred its assets to the University of Missouri and became part of that institution.
We conclude as did the Justice below[2] that it was the intention of the Cobbs that their trust funds be utilized to assist in providing secondary education to Lincoln students. That purpose is now being effectuated through School Administrative District No. 67. The statute makes specific provision for the use of trust funds by the Town to discharge its obligation to contribute to School Administrative District No. 67. It follows, then, that use of the funds for the discharge of the Town's obligation to School Administrative District No. 67 for its share of the secondary education costs of the District fulfills the Cobbs' purpose. That there is direct benefit to the taxpayers of the Town by reason of lessening of its tax burden is not inconsistent with what we understand the Cobbs' purpose to be.
Mattanawcook Academy still lives.
The entry must be:
Appeal denied.
It is adjudicated that Mattanawcook Academy has not ceased to exist within the meaning of the charitable trust created by Mr. and Mrs. Cobb.
It is further adjudicated the Town of Lincoln may use the proceeds from the "Cobb Fund" to reduce its actual amount of tax assessment to the taxpayers of the Town of Lincoln for its share of the support of secondary education of School Administrative District No. 67 in accordance with the provisions of 20 M.R.S.A. 305.
It is further ordered the case is remanded to the Superior Court for the allowance of counsel fees.
WEATHERBEE, J., did not sit.
NOTES
[1]  The Attorney General was appropriately joined as a defendant since by statute he is given supervisory authority over all charitable trusts. 5 M.R.S.A. § 194.
[2]  We do not agree, however, with the presiding Justice's conclusion that the doctrine of cy pres provides a viable alternative basis for the result reached. The doctrine has no application when the settlor has made provision for a gift over to another beneficiary on failure or termination of the primary charitable beneficiary. Bowditch v. Attorney General, 241 Mass. 168, 134 N.E. 796 (1922); Pennsylvania Co. for Banking & Trusts v. Board of Governors of London Hospital et al., 79 R.I. 74, 83 A.2d 881 (1951).
