
614 P.2d 160 (1980)
Rebecca B. LARRABEE, Plaintiff and Appellant,
v.
ROYAL DAIRY PRODUCTS COMPANY, Glenwood B. Larrabee, Defendants and Respondents.
No. 16589.
Supreme Court of Utah.
July 3, 1980.
Roy G. Haslam of Biele, Haslam & Hatch, Salt Lake City, for plaintiff and appellant.
Gerald E. Nielson, Salt Lake City, for Royal Dairy.
Joel Allred, Salt Lake City, for Glenwood Larrabee.
CROCKETT, Chief Justice:
Plaintiff Rebecca B. Larrabee appeals from a judgment that her son, defendant Glenwood Larrabee, has an interest in certain family property consisting of six lots and improvements thereon at 1501 Main Street in Salt Lake City, which plaintiff claims belong exclusively to her.
On September 7, 1973, mother Rebecca and her seven adult children executed an "Agreement" in which she agreed to convey her family property to three of her sons, Otto, Warren and Glenwood, as trustees of a revocable trust, for the use and benefit of plaintiff during her lifetime and for distribution to her children upon termination of the trust. The Agreement also set forth the terms under which the trust estate was to be distributed to the children.
The parts of the Agreement pertinent to the controversy as to whether defendant Glenwood has an interest in the property are:
WHEREAS, Glenwood has been in possession of the property since 1952, and has made substantial improvements to it upon an understanding that he would have the benefit of any excess in the value of the property over $62,000.00 (being the original agreed value of the property of $57,000.00 plus $5,000.00 cash reserve in Royal Dairy, used by Glenwood in connection with said improvements); and
* * * * * *
WHEREAS, the parties hereto wish to provide for the maintenance, operation, and possible future distribution of said property by this agreement.
NOW, THEREFORE, in consideration of the reciprocal covenants, agreements and promises contained herein and of the participation by the parties in the various benefits provided herein, each of said parties by signing and executing this Agreement agrees as follows:
1. Rebecca agrees to cause title to the property to be transferred to Otto, *162 Warren, and Glenwood, as Trustees of a revocable trust, for the use and benefit of Rebecca during her lifetime and for distribution to her children upon her death ...
Pursuant to the Agreement referred to above, the plaintiff executed a trust wherein she conveyed the property to her sons as trustees and provided for distribution upon conditions which are not material to this controversy, except that it reserved the right in the settlor (plaintiff) to revoke the trust.
Four years later plaintiff appears to have had a change of plans. In a letter dated October 20, 1977, (through her attorney) she informed Glenwood that she had revoked the trust agreement; and that he therefore had no interest in the property. She sent him another statement to the same effect on January 18, 1978.
Subsequently, Glenwood recorded a notice of his claim of interest in the property and the plaintiff brought this suit. Her complaint originally alleged that the Agreement was obtained by undue influence and was without consideration and asked that it be declared invalid and of no effect. However, when the case came to trial plaintiff abandoned both of those claims. The documents referred to, to-wit: the Agreement, the revocable trust, and the two letters revoking it were presented in evidence and both parties submitted the case to the court for its ruling on the basis thereof.
The gravamen of the plaintiff's argument is that it was not the intention of the parties to grant any interest in the property to Glenwood, but was simply to create a trust, which was to be revocable at the will of the plaintiff; and that her revocation of the trust had the effect of revoking the Agreement. The defendant's position is that the Agreement recognized that he had fully performed a contract in his custodianship of the property on which he had made substantial improvements with the understanding that "he would have the benefit of any excess in the value of the property over $62,000 ..."; and that while his mother Rebecca could revoke the trust, she could not unilaterally nullify the agreement, nor divest him of his interest in the property.
The position advocated by defendant Glenwood was accepted by the trial court. Because the court's statements in his discussion with counsel clearly express what we think is fair and reasonable interpretation of the Agreement, we set forth his explanation:
THE COURT: As I read the agreement of September '73, it states that Mrs. Rebecca Larrabee has the first $62,000.00 interest in that building and property and that any equity in that building in excess of that amount is Glenwood's.

* * * * * *
That is the agreement, and with the recitals in the agreement about Glenwood's effort, one can understand why that agreement might well have been reached. He spends a lifetime in the building there and remodels it and certainly his efforts are entitled to some consideration. And so I think that is a recognition by his brothers and sisters and his mother that he is entitled to the equity in the building over and above $62,000.00
Now if the building were sold today for $62,000.00, it would all go to Mrs. Larrabee. If it were sold for less than that, all of it that it brought would go to her. If it were sold for more than that, then under this agreement I think Glen gets the excess over the $62,000.00
* * * * * *

It is the trust agreement that is revocable and not the agreement of September '73 that spells out what Glen's interest in the property is.
In harmony with the view thus expressed by the trial court is the fact that in the fashioning of these important documents the revocable trust expressly recited that it could be revoked at the will of the settlor, mother Rebecca, whereas the Agreement, upon which this controversy devolves, did not so provide. In arriving at his conclusion, the trial court applied correct *163 principles as to giving effect to a written document: that where questions arise the first source of inquiry is within the document itself; that it should be looked at in its entirety and in accordance with its purpose; and that all of its parts should be given effect insofar as that is possible.[1]
In applying those principles, in addition to what has been said about recognizing the interest of Glenwood in the property, it is likewise essential to take cognizance of the rights of the mother, Rebecca, therein, as also stated in the agreement. It is plainly apparent that the objective of the Agreement was to place the property in a trust for the benefit of plaintiff Rebecca and her children and the distribution to them after her demise.[2] But it is ineluctably clear that a major purpose of the Agreement was to see that the mother, Rebecca, had the right of recourse to that property to assure that she would be provided for during her lifetime. This is expressly stated in paragraph three of the Agreement:
3. Rebecca shall be entitled to use and consume all of her property during her lifetime, including the Property described herein provided, however, that she agrees:
(a) Not to sell or dispose of the real property herein referred to as the Property until she has used or consumed all of her other assets, except her home, unless she is unable to occupy the same, including the proceeds of any available mortgage of the Property.
(b) Not to use or dispose of her property in a way that will prefer one or more of her children over the others or alter the distribution of her property after her death from that provided for in this Agreement ... [All emphasis herein is added.]
The effect of the decision of the trial court (and this Court's affirmance thereof) is to declare that that Agreement is valid and unrevoked in its entirety. This recognizes the right recited therein of defendant Glenwood of "the benefit of any excess in the value of the property over $62,000," but it also recognizes the right of the mother, Rebecca, "to use and consume all of her property during her lifetime," subject to the conditions stated.
The judgment that the Agreement of September, 1973, stands unrevoked is affirmed. No costs awarded.
MAUGHAN, WILKINS and HALL, JJ., concur.
STEWART, J., concurs in result.
NOTES
[1]  See Thomas J. Peck & Sons, Inc. v. Lee Rock Products, Inc., 30 Utah 2d 187, 515 P.2d 466 (1973), citing Restatement of Contracts, Section 235; Jensen's Used Cars v. Rice, 7 Utah 2d 276, 323 P.2d 259 (1958).
[2]  Undoubtedly for the purpose of eliminating probate.
