
14 Cal.App.2d 604 (1936)
K. L. GELGUD, Appellant,
v.
LOS ANGELES ROCK & GRAVEL COMPANY (a Corporation) et al., Respondents.
Civ. No. 10872. 
California Court of Appeals. Second Appellate District, Division Two.  
June 16, 1936.
 Monta W. Shirley, Barry Sullivan and George W. Nilsson for Appellant.
 Everard L. McMurrin for Respondents.
 Wood, J.
 Plaintiff appeals from a judgment in favor of defendants. It was stipulated that the Los Angeles Rock & Gravel Corporation acquired the assets and assumed the liabilities of the Los Angeles Rock & Gravel Company. For brevity the defendants will hereinafter be referred to as the Company. No findings were made by the trial court, the *606 case having been tried upon an agreed statement of facts. According to the stipulation plaintiff was the owner of the real property described in the complaint and on or about October 10, 1931, he employed the Company to do certain excavation work thereon for the agreed price of $2,425. The work was completed and the Company, not having been paid, filed a mechanic's lien against the property for $2,425. On March 16, 1932, "in payment and satisfaction" of the lien, plaintiff caused the property to be conveyed to the Company and as part of the same transaction plaintiff and the Company executed a written agreement dated March 16, 1932, by which it was agreed that the Company would sell and convey to plaintiff and the plaintiff would buy the property on or before November 19, 1932, for the sum of $2,950, subject to incumbrances of record. The agreement contained the following provision: "It is further understood and agreed that the seller herein mentioned, may at any time on or before November 19, 1932, unless the purchase price above provided for be sooner paid, sell said property to any other person or persons at a gross sales price of Twenty-three Thousand Five Hundred Dollars ($23,500.00) or more, and that this contract shall be canceled upon payment to the buyer herein mentioned of a sum equal to two-thirds of the net amount of said sale price after deducting the amounts then due on all incumbrances of record, together with the sum of Two Thousand Four Hundred Twenty-five Dollars ($2,425.00) due the Los Angeles Rock and Gravel Company, and a sales commission not exceeding five (5 %) per cent of the selling price."
 Payments on a trust deed upon the property were in default and the holder of the trust deed "threatened" foreclosure. On April 25, 1932, the Company conveyed the property to the holder of the trust deed for a consideration of $250. No part of this or any other sum was paid to plaintiff. At the time of the conveyance by the Company there were two trust deeds upon the property upon one of which there was due the sum of $13,060, and interest in the sum of $438.75. The amount of the other trust deed, which had not matured, was $3,500, and there was due $61.25 for interest. Plaintiff demands payment of two-thirds of the net sum which would be computed upon a sale in the sum of $23,500, less the amounts of the first trust deed and interest, the amount of the mechanic's lien and the seller's commission. *607
 [1] The transaction should be regarded "in the light of the circumstances surrounding the parties". (Civ. Code, sec. 1647; Balfour v. Fresno C. & I. Co., 109 Cal. 221 [41 P. 876, 878].) It is apparent that the parties intended to put the property in the name of the Company for the purpose of securing the Company in its claim for work performed and to enable plaintiff to save his property from loss by paying the Company the sum of $2,950, before November 19, 1932, with the understanding that if a buyer should be found by that time for the sum of $23,500 or more the net profit would be divided two-thirds to plaintiff and one-third to the Company. Under such circumstances a trust was created and the Company became obligated to hold the property in conformity with the terms of the agreement unless it should be sold in accordance with the provisions thereof. In Campbell v. Kennedy, 177 Cal. 430 [170 P. 1107], the plaintiffs were the owners of certain mining property which was about to be sold under an execution issued upon a judgment against them. Being without means they applied to the defendant for assistance with the result that the defendant advanced $1,200 to pay the judgment. The plaintiffs conveyed the property to the defendant who gave them in return a writing whereby he agreed that whenever he sold the property he would, after deducting the amounts advanced by him, give one-half of the balance of the purchase price to the plaintiffs. The court said: "The conveyance was made to him in trust to sell the property and to divide the profits between the grantor and himself, after first deducting the amount of his advances."
 [2] Defendants contend that plaintiff's remedy is a suit for breach of the contract to convey to him and that his measure of damages is fixed by section 3306 of the Civil Code and point out that the agreed statement of facts contains nothing to show the value of the property. In this contention defendants select only one feature of the agreement of the parties and disregard another important feature. A contract must be construed in its entirety and the intention of the parties must be gathered from the whole instrument, taking it by its four corners. The agreement must be construed in such a manner as will give effect to every part of it. (Civ Code, sec. 1641; 6 Cal.Jur., p. 268 and cases there cited.) Bearing in mind these rules we must conclude that *608 the Company not only agreed to convey the property to plaintiff under certain circumstances but also agreed to pay to plaintiff a certain definite sum if the property should not be held until November 19, 1932. The Company did not hold the property but disposed of it in violation of the terms of its agreement. It therefore became liable to pay to plaintiff the amount agreed upon, based upon the provision in the contract which fixed the sum due plaintiff in the case of a sale. [3] The contention of plaintiff is not defeated by section 1670 of the Civil Code by which it is provided that a part of a contract which fixes the amount of damages for breach of an obligation is void. The obligation breached by defendants was to pay money only and the detriment caused by the breach "is deemed to be the amount due by the terms of the obligation, with interest thereon". (Civ. Code, sec. 3302; Brown v. Lamb, 83 Cal.App. 187 [256 P. 825]; Vitagraph, Inc., v. Liberty Theatres Co., 197 Cal. 694 [242 P. 709].)
 [4] In calculating the amount due, plaintiff contends that the amount of the second trust deed for $3,500 should not be deducted for the reason that it was not "due" at the time of the sale by the Company. The word "due" has a double meaning. It does not always mean that the money is then immediately payable. It is sometimes so used but it is also used to refer to an existing obligation which may be payable at some future time. (Ahlgren v. Walsh, 173 Cal. 27 [158 P. 748, Ann. Cas. 1918E, 751]; Joy v. Rousseau, 72 Cal.App. 179 [236 P. 972].) From a consideration of the transaction as a whole we conclude that it was the intention of the parties that the amount of the second trust deed should be deducted in arriving at the sum due plaintiff.
 The judgment is reversed with directions to the superior court to enter judgment for plaintiff against both defendants in the sum of $1893.33, with interest thereon at the rate of seven per cent per annum from April 25, 1932.
 Gould, J., pro tem., and Crail, P.J., concurred.
