
20 Cal.2d 751 (1942)
UNIVERSAL SALES CORPORATION, LTD. (a Corporation), Respondent,
v.
CALIFORNIA PRESS MANUFACTURING COMPANY (a Corporation), Appellant.
S. F. No. 15988. 
Supreme Court of California. In Bank.  
Aug. 27, 1942.
 Molkenbuhr & Molkenbuhr, Charles O. Bruce, Walter H. Linforth and Wm. M. Cannon for Appellant.
 McCutchen, Olney, Mannon & Greene as Amici Curiae on behalf of Appellant.
 Carl R. Schulz, Hugh S. Center, Arthur G. Shoup, Wallace Sheehan, Harold C. Faulkner and Gregory, Hunt & Melvin for Respondents.
 CURTIS, J.
 This is an appeal by the defendant, California Press Manufacturing Company, from certain parts of a judgment in favor of the plaintiff, Universal Sales Corporation, Ltd.
 The action is based on a written contract dated March 2, 1931, between the plaintiff, a subsidiary of the San Francisco Milling Co., a producer and distributor of poultry and animal feed, and the defendant, a manufacturer of various types of presses. Since the questions presented upon this appeal concern *756 primarily the scope of this contract and the legal rights and duties of the respective parties thereunder, it is essential in the disposition of this cause that the more important provisions of this writing be recited in some detail.
 The contract contains three introductory "Whereas" clauses which state that the defendant has manufactured and has for sale a certain pellet press; that the defendant believes that it has manufactured a machine which will produce the results of a cuber press now operated by the plaintiff, and with a like or greater capacity; and that the defendant desires the plaintiff to purchase and operate the machine so as to be able to demonstrate its advantages. [The cuber press mentioned is an English pellet-making machine which at that time was being used by the plaintiff to produce feed pellets.]
 It is then agreed that the defendant shall sell and the plaintiff shall purchase the machine for $2,000, payable $500 "upon delivery and test" and the balance in installments of $500 per month. This language is followed by the proviso that if the machine does not operate properly or with sufficient capacity, the plaintiff shall be under no obligation to pay for it, but the defendant shall not be liable for consequential damages, and the liability of the defendant shall be exclusively limited to accepting from the plaintiff the return of the machine and refunding the payments made. In this connection it is stated that before rejection of the machine the defendant shall have the privilege, should it so desire, of making such adjustments as will enable it to make the machine operate satisfactorily.
 The contract further provides that in consideration of the purchase of the machine and the advantages of demonstration and advertising that the defendant will derive from the use of the machine by the plaintiff, the defendant agrees that as to all further sales of presses made by it, based upon the press sold to the plaintiff, and whether such sales be negotiated by the plaintiff or otherwise, twenty per cent of the gross selling price shall belong to the plaintiff and be paid by the defendant to the plaintiff when and as the said selling price is received by the defendant. In this part of the contract the plaintiff agrees to foster the sale of the manufactured machines. Then follows a stipulation that the agreement shall remain in effect for seventeen years from its date. It is further stated that the defendant agrees "to endeavor to patent said machine, or the improvements thereon"; and in the event of success in that regard, the defendant agrees that the plaintiff shall have "a twenty per cent interest in such patent or *757 patents and in any improvements thereon that may be thereafter made by either party; the expense in prosecuting said patents to be borne twenty per cent by" the plaintiff "and eighty per cent by" the defendant.
 The record discloses that the plaintiff operated the machine intermittently until December, 1931, and that it never did function with steady efficiency and sufficient capacity to satisfy the plaintiff. During this period of operation a great deal of effort was exerted by the officers and employees of each of the companies both in repair work and in attempts to increase the productive capacity of the machine, but apparently with only ephemeral success. Without endeavoring to describe in detail the mechanism of the press delivered to the plaintiff, it is sufficient to state that the meal, after being mixed and heated, is fed to a die-plate, through the holes of which the material is extruded in solid form by pressure. The prepared mash is fed to and pressed through the perforated die-plate by means of a worm laid horizontally and enclosed in casing. The principal difficulty encountered by the parties in the operation of this press was the tendency of the mash to solidify into a hard cake, which would not pass properly or uniformly through the holes of the die, so that the frequent clogging of the machine necessitated the removal of the die and its cleaning numerous times daily.
 Sometime in the fall of 1931 and without the knowledge of the plaintiff, the defendant began to develop a variant form of press, featuring a roller mechanism, standing vertically and without casing, in place of the horizontal, encased worm or screw. Coincident with its progress with this change of construction, the defendant lost interest in making further adjustments on the screw-type press furnished to the plaintiff as specified in the agreement. Meanwhile the plaintiff, encouraged by the intermittent successful operation of the contract machine and convinced that its perfection would involve only a few minor alterations, was instrumental in interesting several milling companies in the trade in the outcome of the joint experimental efforts of the respective parties with the original pellet-producing device. Upon learning of the defendant's activity in connection with the manufacture and marketing of the roller-type press, the plaintiff advised the defendant that it considered the newly-developed machine to be within the purview of the contract and that it would insist upon the recognition of its rights thereunder. The defendant dissented *758 from this version of the scope of the agreement between the parties. In view of the defendant's determined stand on the matter, as well as its disinclination to do any more repair work on the original pellet press, the plaintiff in July, 1932, notified the defendant of its desire to return this machine and requested the refund of two installments, amounting to $1,000, which had been paid on account of the purchase price. At the same time the plaintiff made specific demand for its proportionate share of the receipts collected by the defendant as the result of the sale of these later-developed presses to various milling companies. The defendant refused to comply with the plaintiff's terms as to both matters, although after the suit was commenced and by way of an amended answer, the defendant did alter its position to the extent of conceding the plaintiff's right under the contract to return the machine and its own liability for the $1,000, with interest.
 On September 14, 1932, the plaintiff instituted this action and, by way of an amended complaint, recited the contract and many of the facts above related. In particular, the plaintiff alleged that subsequent to the date of the contract the defendant had manufactured and sold eight presses under the trade name of California Pellet Mill; that such presses were merely improvements on and were based on the pellet press sold to the plaintiff; and that plaintiff had demanded twenty per cent of the gross selling price of the pellet mill presses and a twenty per cent interest in patents obtained thereon, and improvements thereon. In a supplemental complaint the plaintiff alleged further sales by the defendant of the pellet mill presses and asked for an accounting. The plaintiff also claimed to have performed all conditions by it to be performed under the contract. The defendant by its denials put all controverted matters in issue, and in addition pleaded certain affirmative defenses to which reference will be made later in this opinion.
 After an extended hearing the trial court found, among other things, that the contract was a mutual agreement of the parties to cooperate and work together and pool their inventive ideas in an endeavor to perfect the pellet press agreed to be sold and the improvements thereon and to manufacture, market and introduce it into general use; that in the dealings of the parties under the contract they did so practically construe it in their operations and transactions thereunder; that with the exception of failure on the part of the defendant to disclose to the plaintiff the defendant's ideas and plans with *759 reference to certain improvements in substituting roller pressure for screw pressure in extruding the feed through the die, the plaintiff and the defendant freely exchanged, for their mutual benefit, their ideas and plans with reference to the "pellet press" pursuant to the provisions of the contract, and the above-mentioned ideas and plans were the result of said cooperation and working together of the plaintiff and the defendant and of the demonstration of needful changes by the plaintiff's use of the "pellet press," delivered to the plaintiff for the purposes of the contract; that the "pellet mill press" was based on the "pellet press" originally furnished to the plaintiff and any changes were merely improvements on the "pellet press" within the meaning of the term as used in the contract. The court further found that the plaintiff fully performed all matters and conditions to be performed by it under the contract; that the plaintiff at all times acted in accordance with and insisted upon its rights under the terms of the contract; that the plaintiff kept the "pellet press" in operation and demonstration at its plant as long as any benefit to the parties could result from such activity; that the plaintiff did not fail, refuse or neglect to foster the sale of similar machines; that the plaintiff did not abandon or waive any of its rights or privileges under the contract by its offer to return the "pellet press" to the defendant and its demand for a refund of the installments paid; and that the defendant's concealment of its activities in connection with the manufacture and marketing of the "pellet mill press" was a breach of its legal duty and a violation of the contract both in letter and in spirit.
 The defendant appeals from such portions of the judgment as declare that the plaintiff is entitled to a twenty per cent interest (1) in a so-called "pellet press," (2) in a so-called "pellet mill press," (3) in any patents heretofore or hereafter obtained by the defendant thereon, (4) in any patents heretofore or hereafter obtained by the defendant on any improvements thereon, (5) in the gross selling price of any and all future sales of both pellet presses or pellet mill presses, and (6) from such portion thereof as awards judgment against the defendant for $24,884.70, and interest in the sum of $5,665.69. The former figure represents twenty per cent of the gross proceeds of the "pellet mill presses" sold plus the $1,000 paid by the plaintiff upon the purchase price of the "pellet press" delivered to it. *760
 [1a] The principal problem presented on this appeal consists of a determination of whether or not the language of the contract is sufficiently certain and definite to render unnecessary a resort to extraneous evidence respecting the circumstances surrounding the execution of the instrument, the situation of the parties, and their intention in executing it. It is the defendant's contention that under the plain terms of the agreement the plaintiff's offer to return the pellet press and its demand for the refund of the two installments paid on account of the purchase price constituted a rejection of the machine and cancelled the contract. In this connection controlling importance is assigned to the provision that upon the failure of the machine to operate properly or with sufficient capacity, the obligation of the plaintiff as purchaser to pay for it was removed and the liability of the defendant as seller should be exclusively limited to accepting the return of the press and refunding the payments made thereon. It must be conceded that if this language upon which the defendant relies with so much assurance is regarded as the sole measure of the rights and obligations of the parties under the contract, the defendant's contention is tenable. However, there are other provisions in the instrument which must also be taken into consideration. [2] The fundamental canon of construction which is applicable to contracts generally is the ascertainment of the intention of the parties (Civ. Code,  1636), and in accordance with section 1638 of the Civil Code, the language of the agreement, if clear and explicit and not conducive to an absurd result, must govern its interpretation. But this does not mean that a portion only of a written instrument, although it is clear and explicit, may be selected as furnishing conclusive evidence of the intentions of the parties. Section 1641 of the Civil Code embraces the true rule in providing that "The whole of a contract is to be taken together, so as to give effect to every part, if reasonably practicable, each clause helping to interpret the other."
 [1b] Application of the principle announced in the last-mentioned section makes it necessary, therefore, to consider the import of that part of the document referable to the plaintiff's share in the benefits to be derived from the development and sales promotion of the press and of machines based thereon, as well as its interest in the defendant's prosecution of patent applications covering the pellet-producing device or "any improvements thereon that may be thereafter made by either party." Other significant phraseology appearing in *761 this connection is the stipulation that "This agreement shall remain in effect for seventeen years from date hereof and shall be binding upon and inure to the benefit of the successors and assigns of the parties hereto." The correlation of this express reference to the duration of the agreement pursuant to the scheme for the marketing of the presses with the language measuring the rights, duties and obligations of the parties with respect to the agreed terms of sale and purchase contained in the forepart of the document creates an ambiguity upon the face of the contract as to the nature and scope of the transaction which the parties intended to cover. Such uncertainty in terminology must be resolved in accordance with recognized standards of interpretation. (Civ. Code,  1637; Restatement, Contracts,  235-236.)
 [3] As an aid in discovering the all-important element of intent of the parties to the contract, the trial court may look to the circumstances surrounding the making of the agreement (Civ. Code,  1647; Smith v. Carlston, 205 Cal. 541, 550 [271 P. 1091]; Katz v. People's Finance & Thrift Co., 101 Cal.App. 552, 558 [281 P. 1097]; Meyers v. Nolan, 18 Cal.App.2d 319, 322 [63 P.2d 1216]; 12 Am. Jur. 784,  247), including the object, nature and subject matter of the writing (First National Bank v. Bowers, 141 Cal. 253, 262 [74 P. 856]; Weaver v. Grunbaum, 31 Cal.App.2d 42, 48 [87 P.2d 406]; 12 Am. Jur. 776,  242), and the preliminary negotiations between the parties (Balfour v. Fresno Canal & Irr. Co., 109 Cal. 221, 226 [41 P. 876]; 12 Am. Jur. 757,  234), and thus place itself in the same situation in which the parties found themselves at the time of contracting. (Code Civ. Proc.,  1860; Tennant v. Wilde, 98 Cal.App. 437, 445 [277 P. 137]; Pacific Indemnity Co. v. California Electrical Works, Ltd., 29 Cal.App.2d 260, 272 [84 P.2d 313]; 17 C.J. S. 744,  321.) [4] Also applicable here is the familiar rule that when a contract is ambiguous, a construction given to it by the acts and conduct of the parties with knowledge of its terms, before any controversy has arisen as to its meaning, is entitled to great weight, and will, when reasonable, be adopted and enforced by the court. (Work v. Associated Almond Growers, 102 Cal.App. 232, 235 [282 P. 965]; 6 Cal.Jur. 304,  184.) The reason underlying the rule is that it is the duty of the court to give effect to the intention of the parties where it is not wholly at variance with the correct legal interpretation of the terms of the contract, and a *762 practical construction placed by the parties upon the instrument is the best evidence of their intention. (2 Elliott on Contracts,  1537; 12 Am. Jur. 787,  249.) As was said in Mitau v. Roddan, 149 Cal. 1, 14 [84 P. 145, 6 L.R.A. (N. S.) 275]: "It is to be assumed that parties to a contract best know what was meant by its terms, and are the least liable to be mistaken as to its intention; that each party is alert to his own interests, and to insistence on his rights, and that whatever is done by the parties contemporaneously with the execution of the contract is done under its terms as they understood and intended it should be. Parties are far less liable to have been mistaken as to the intention of their contract during the period while harmonious and practical construction reflects that intention, than they are when subsequent differences have impelled them to resort to law, and one of them then seeks a construction at variance with the practical construction they have placed upon it. ... In its execution, every executory contract requires more or less of a practical construction to be given it by the parties, and when this has been given, the law, in any subsequent litigation which involves the construction of the contract, adopts the practical construction of the parties as the true construction, and as the safest rule to be applied in the solution of the difficulty. (citing cases.)"
 [5a] Measured in the light of these well-established principles of interpretation, the record reveals ample evidence in support of the findings in favor of the plaintiff as to the scope and purpose of the contract in controversy. It appears that in connection with its business operations, the San Francisco Milling Company (the plaintiff's parent company) had been using an English machine called a "cuber press" for the production of certain poultry feed in pellet form. Unsatisfied with the output of the English press, the superintendent of the Milling Company in November, 1930, conceived the idea of interesting the defendant, an established machinery manufacturing company, in the development of a pellet-making machine of greater efficiency, and he so expressed himself to the defendant's president. As a result of many conferences between the representatives of the respective companies and in January, 1931, a pellet press was completed by the defendant, and installed in the plant of the Milling Company, where it was initially operated on February 15, 1931. Meanwhile, the plaintiff corporation was organized for commercial exploitation of the new machine when perfected. Many defects appeared in the press during the following months of experimentation *763 and numerous changes in construction were made by the defendant in response to suggestions of the representatives of the respective companies as to the improvement of the mechanism. While the machine was still in its imperfect state insofar as commercial operation was concerned, the contract in suit, dated March 2, 1931, was executed on April 30, 1931. The relationship between the parties did not change upon the signing of the agreement, and they persisted in their cooperative efforts to develop and market an efficient press. The parties continued to share in the expense attendant upon experimentation with the suggested improvements--such as the plaintiff's idea for the multiple extrusion of pellets involving the addition of a double worm and double knife to the original machine, and the defendant's frequent recommendations for alterations of the die in respect to various features of drilling and thickness--the plaintiff undertaking to demonstrate the working processes of the press through its operation at a cost differential of $4 to $6 per ton on all pellets manufactured and the defendant making the necessary mechanical adjustments free of charge.
 During this period the plaintiff, convinced of the ultimate success of the pellet-producing mechanism, began a selling and advertising campaign to create a market for the machine, interested several other milling companies as prospective purchasers and referred their inquiries to the defendant for appropriate consideration. Moreover, as evidence of its sincerity in this regard, the plaintiff took an option on two more of the pellet worm-type presses, and its parent company, the San Francisco Milling Company, purchased one of these machines. It was not until December, 1931, and following its manufacture of a press utilizing roller instead of screw pressure as the medium of force and its sale of several of these variant forms to milling companies previously recommended by the plaintiff, that the defendant manifested a change of attitude in its relation with the plaintiff by refusing to proceed further with repair work on the model delivered to the plaintiff. Learning of this marketing activity by the defendant and realizing the futility of attempting to cope longer with the defective features of the original press in view of the defendant's confessed lack of interest in that design and its refusal to recognize the plaintiff's assertion of certain rights in the new machine under the terms of the contract, the plaintiff, in July, 1932, offered to return the experimental press to the defendant and demanded both a refund of the installments *764 paid on the original model and its proportionate share of the gross proceeds received by the defendant from the sales of the pellet mill presses, as contemplated by the agreement. Unable to prevail upon the defendant in either respect, the plaintiff in September, 1932, instituted the present litigation seeking a declaration of the rights and duties of the parties under the contract.
 Upon the basis of these facts the trial court found that "under the terms of the said contract it was the mutual agreement of plaintiff and defendant to cooperate and work together and pool their inventive ideas in an endeavor to perfect the 'pellet press' agreed to be sold and the improvements thereon and to manufacture, market and introduce it into general use." The contract bears evidence that the parties did not regard the press supplied to the plaintiff as a pattern of perfection, for particular reference is made to the "testing" of it at the mill and the defendant's privilege of adjusting the machine if it should so desire. In other words, the defendant, having the facilities for the manufacture of machinery, desired the benefit to be derived in experimentation with the press incident to continuous milling operations and the plaintiff undertook to contribute to the venture practical demonstration of the mechanism under the direction of experienced employees, and to do advertising and promotion work for the purpose of creating a market for an efficient pellet-producing machine. This cooperation promotive of the common enterprise and involving the combination of the skill and efforts of both the plaintiff and the defendant suggests that the parties intended to establish a contractual relationship between themselves akin to that of joint adventurers. Further indication of this purpose is the royalty clause of the agreement referable to the plaintiff's share of the gross proceeds of sales of presses based upon the original model, whether such sales be negotiated by the plaintiff or the defendant, and the clause relating to the respective interests of the parties in any patent of the machine and "any improvements thereon that may be thereafter made by either party." [6] While in a technical joint venture there is usually a sharing of profits and losses in the prosecution of the common enterprise (2 Rowley's Modern Law of Partnership,  975; 33 C.J. 841,  2), the mode of participating in the fruits of the undertaking may be left to the agreement of the parties. (Hamer v. MacClatchie, 220 Cal. 720 [32 P.2d 620].) [7] Whether the parties to a particular contract have thereby created, as *765 between themselves, the strict relation of joint adventurers or some other relation involving cooperative effort, depends upon their actual intention, which is determined in accordance with the ordinary rules governing the interpretation and construction of contracts. (33 C.J. 845,  16.) Such a contract need not be express; it may be implied from the conduct of the parties. (2 Rowley's Modern Law of Partnership,  976.) The acts and conduct of the parties engaged in the accomplishment of the apparent purposes may speak above the expressed declarations of the parties to the contrary. (O. K. Boiler & Welding Co. v. Minnetonka Lumber Co., 103 Okla. 226, 228 [229 P. 1045].) [5b] In the present case the trial court's interpretation of the parties' agreement as expressive of their intention to engage in a cooperative scheme calling for the pooling of inventive ideas in promotion of the common enterprise is consistent with the language of the contract as well as with the foregoing evidence showing that until the defendant refused to work further with the plaintiff, the plans and ideas of the parties were freely exchanged for their mutual benefit. It necessarily follows from such state of the record that the court was warranted in making the above-quoted finding referable to the cooperative undertaking of the parties.
 [8a] The next point to be considered is whether, within the meaning of the contract, the new model is "based upon" the press made for the plaintiff so as to be treated as an "improvement thereon," as urged by the plaintiff, or embodies, as the defendant contends, a new invention which in no way concerns the plaintiff. The principal difference between the "pellet press" originally delivered to the plaintiff and the "pellet mill press" subsequently developed and sold to others by the defendant lies essentially in the means used to force the mash through the perforations in the die- plate. As previously stated, in the press furnished to the plaintiff the prepared material was fed to and forced through the perforated die-plate by means of a worm laid horizontally and enclosed in casing. In the new type of press a roller mechanism, standing vertically and without casing, supplants the horizontal, encased worm. The mash is then fed by gravity and forced into the die-plate by rotary action of the roller, which exerts its form of pressure without actual contact with the face of the die. The roller takes the place of the worm and the casing is no longer necessary. The plaintiff concedes that the *766 "pellet mill press" embraces an improved extruding mechanism, but it attributes its annexation and efficacy to the demonstration of needful changes in the course of the many months of experimental operation of the original model as pursued by the plaintiff and the defendant at the mill of the San Francisco Milling Company.
 At the trial avail was made of experts in patent law by both parties, and as would be inferred, those witnesses differed sharply in their opinions as to the equivalence of the roller and the worm as physical agencies for establishing, conjointly with other common factors, the functional relationship essential to commercial productivity. Based upon its consideration and evaluation of these conflicting views as well as the information gained from a visual inspection of the characteristic features of the two machines, which is proper evidence in a case (Ethel D. Company v. Industrial Acc. Com., 219 Cal. 699, 704 [28 P.2d 919]; Vaughan v. County of Tulare, 56 Cal.App. 261, 265 [205 P. 21]; MacPherson v. West Coast Transit Co., 94 Cal.App. 463, 466 [271 P. 509]; 24 Cal.Jur. 752,  34), the court found that "none of said differences changed the essential nature of said 'pellet press' and each difference was the substitution of a generic equivalent." [9] It is well settled that the relative weight to be given opinion testimony and factual evidence is for the trial court. (Rolland v. Porterfield, 183 Cal. 466, 469 [191 P. 913]; Ross v. Hieronymus, 2 Cal.App.2d 258, 265 [37 P.2d 837]; Shaw v. Owl Drug Co., 4 Cal.App.2d 191, 196 [40 P.2d 588].)
 [8b] In considering whether under the language of the contract the plaintiff can be said to have any rights in the new press, the following phraseology is significant: "of all further sales of presses ... based upon the press sold to the party of the first part (plaintiff) ... twenty per cent of the gross selling price thereof shall belong to the party of the first part (plaintiff) and be paid by the party of the second part (defendant)." The broad scope of this clause predicate of the plaintiff's right to royalty payments, when related to the above-noted covenant embracing improvements, reasonably suggests that the parties did not intend to limit their agreement within the narrow confines and technical provisions of the patent law, but that it was their understanding to associate themselves in a common venture for the development of a marketable pellet machine, with the original *767 model as a provisional rather than a perfected structure, and in contemplation of "improvements thereon" as the result of further operative experience. Consistent with this observation, the defendant's citation of cases turning on the refinements of the law governing patent infringement and holding that a contract to assign improvements included only improvements to the particular machine secured by the patent, is of no avail here. (McAuley v. Chaplin-Fulton Mfg. Co., 217 Pa. 477 [66 Atl. 750]; Stitzer v. Withers, 122 Ky. 181 [91 S.W. 277]; Allison Bros. Co. v. Allison, 144 N.Y. 21 [38 N.E. 956].) Parenthetically it might be noted that it appears from the record that the machine as to which the parties were contracting was not patented, in recognition, no doubt, of the existence of certain defects in its then state of operative efficiency.
 The comprehensive character of the words "improvements thereon" as used by the parties should not be overlooked. In American Cone & Wafer Co. v. Consolidated Wafer Co., 247 Fed. 335 [159 C.C.A. 429], wherein was considered an assignment of a patent for a device for making ice-cream cones, "as well as all improvements that may be made thereto or thereunder," Judge Learned Hand, in taking occasion to draw a distinction between an "improvement to" and an "improvement upon" a machine, said at page 336: "Every more efficient machine would be an improvement 'upon' it, in common speech, but not 'to' it. We attach significance to the word 'thereto,' and we should attach an added significance as well to 'thereunder,' if we could find any meaning for it. ... Groset [the patentee] was free to make a new cone baker, which might successfully compete with the plaintiff, so long as it was not an improvement 'to' the disclosure of his first patent." In similar vein in West Disinfecting Co. v. United States Paper Mills, Inc., 44 F. (2d) 803, affirmed 62 F. (2d) 1086 (cert. den. 283 U.S. 836 [51 S. Ct. 485, 75 L.Ed. 1448]), the court with reference to the expression "improvements thereon or variations thereof" stated at page 804: "From the foregoing it seems clear to us that what the parties had in view when this contract was made was not the technical provisions of the patent law but the improvement of a folding machine such as it was then using. To effect such improvement the contract provided for the plaintiff's obtaining not only the then discovered improvement Winter had made on the old folding machine and which *768 was embodied in his patent application therefor, but it also contemplated that Winter might make 'improvements thereon,' or 'variations thereof,' or improvements 'affecting said folding machine.' " As was aptly noted by Judge Hand in the American Cone case, supra, at page 337: "We must try rather to assume the posture of the parties at the time, and consider what most men would have thought such language covered." In this regard it must be borne in mind that what the parties had before them and what constituted the subject matter of the contract was a commercially impractical pellet press, so that their employment of the words "based upon" and "improvements thereon" in connection with their joint undertaking for the development and promotion of a marketable machine, strongly suggests that they were then contemplating the accomplishment of a specific result even though effected by some substitution for the original functional mechanism. Accordingly, whether the roller is a mechanical equivalent of the worm in the screw-type press under the canons of patent law is not a matter for determination in this case. The function which the roller performs as a compressing device is so similar to that of the worm that within the scope of the contract the new model as a unitary structure may well be treated as an improvement based upon the old, and the trial court's finding in harmony with this construction will not be disturbed.
 [10] Nor is there any merit to the defendant's claim that the plaintiff's failure to pay the full price for the original machine indisputably constitutes a bar to its participation in the benefits attendant upon the development and sale of the improved press. In this connection the defendant refers to that portion of the contract wherein the defendant agrees to pay the plaintiff twenty per cent of the gross selling price of further sales of presses "in consideration of the purchase of said machine and the advantages of demonstration and advertising" that the defendant "will derive from the use of said machine" by the plaintiff. The words "purchase" and "sale" in a contract do not necessarily connote an executed or consummated purchase or sale, but are frequently used in the sense of an agreement to buy or sell. (23 R. C. L. 1347,  171.) The interpretation of these terms in any particular case is controlled by the context of the writing, and the whole instrument must be examined. (Blackwood v. Cutting Packing Co., 76 Cal. 212, 218 [18 P. 248, 9 Am.St.Rep. 199]; *769 Walti v. Gaba, 160 Cal. 324 [116 P. 963]; Estate of Goetz, 13 Cal.App. 198, 201 [109 P. 145]; MacRae v. Heath, 60 Cal.App. 64, 68 [212 P. 228].) Here the plaintiff was not required to keep and pay for the machine unless it operated "properly and with sufficient capacity," and the defendant reserved the privilege of making adjustments to enable the machine "to operate satisfactorily." Thus, it is apparent the plaintiff's obligation to purchase was not absolute but was subject to the foregoing qualifications and conditions. It therefore would appear that the contract was open to construction on this point, and the trial court's finding that the parties meant "an agreement to purchase" by the plaintiff to serve as part of the consideration for the royalty payments will not be disturbed where such view is consistent with the surrounding circumstances and other provisions of the contract evidencing the intention of the parties. (Katz v. People's Finance & Thrift Co., supra, at p. 557.) Moreover, the defendant did derive the advantages of demonstration and advertising from the plaintiff's use of the original machine in the working laboratory, as above stated; and undeniably the plaintiff did foster the sales effected by the defendant prior to the rupture of their relationship in July, 1932. Although the machines sold were the improved presses, yet the trial court's finding based upon substantial evidence that the "improvements" resulted from the experimental operation of the original model in the workshop furnished by the plaintiff in accordance with the parties' understanding effectively establishes that the plaintiff should not be deprived of the fruits of the valuable services rendered by reason of the defendant's secretiveness as to the development and marketing of the roller mechanism. In such circumstances there was no failure of consideration upon the plaintiff's part.
 [11] Moreover, the above recital of the plaintiff's performance within the purport of the parties' understanding as found by the trial court furnishes a complete answer to the defendant's charge of lack of mutuality as to the respective promises or obligations of the parties under the contract. As stated, the plaintiff did with the press furnished to it whatever could be done in demonstrating the machine, advertising it and fostering sales thereof, and the record discloses ample evidence that the defendant has enjoyed the fruits of the plaintiff's missionary activities. In such situation and apart *770 from any question of mutuality of obligation in the first instance, this performance by the plaintiff prior to institution of this action was sufficient to create a mutuality of remedy so as to justify its seeking appropriate relief in this litigation for the failure of the defendant to conform with the terms of the agreement. (Thurber v. Meves, 119 Cal. 35, 37-39 [50 P. 1063, 51 P. 536]; Sayword v. Houghton, 119 Cal. 545, 548 [51 P. 853, 52 P. 44]; Wheat v. Thomas, 209 Cal. 306, 314 [287 P. 102]; Gosnell v. Lloyd, 215 Cal. 244, 253 [10 P.2d 45]; 23 Cal.Jur. 450,  22.)
 [12] Likewise without force is the defendant's argument that the plaintiff's offer to return the machine coupled with its demand for a refund of the installments paid constituted a termination of the contract. The provision on which the defendant relies in this connection reads as follows: "In the event that said machine shall not operate properly or with sufficient capacity, first party (plaintiff) shall be under no obligation to pay for same, but second party (defendant) shall not be liable for consequential damages, and the liability of second party shall be exclusively limited to accepting from the party of the first part the return of said machine and refund payments made thereon." If by this language specifically restricted to the measure of the defendant's liability upon the plaintiff's return of the machine, the parties contemplated a stipulation for termination of the contract, necessarily involving the forfeiture of the plaintiff's rights thereunder, it would have been a simple matter to have so provided in plain terms. Instead the parties in a subsequent clause of their agreement expressly stated "This agreement shall remain in effect for seventeen years from date hereof." Settlement of such uncertainty existing on the face of the instrument as to the parties' intent with respect to the duration of their agreement calls for the trial court's application of the familiar rules of interpretation, as above stated. (Pacific Indemnity Co. v. California Electric Works, Ltd., supra.) "Liability" is a term which is frequently construed in the light of the surrounding circumstances to determine if it refers to all obligations accrued and contingent or only to some particular liability which the parties had in mind. (Coulter Dry Goods Co. v. Wentworth, 171 Cal. 500 [153 P. 939]; Rowell v. Western Motor Transport Co., 94 Cal.App. 12 [270 P. 400].) Relevant to the consideration of the parties' purpose in thus incorporating in *771 their contract a provision manifestly susceptible of varied shades of meaning is the apt observation of Mr. Justice Holmes: "A word is not a crystal, transparent and unchanged, it is the skin of a living thought and may vary greatly in color and content according to the circumstances and the time in which it is used." (Towne v. Eisner, 245 U.S. 418, 425 [38 S. Ct. 158, 62 L.Ed. 372, L.R.A. 1918D, 254].) In rejecting the defendant's theory that the provision in question embraced a scheme for the defendant's release from all liability under the contract, the trial court found in substance that the "liability" so prescribed meant only liability for damages due to failure of the machine to operate properly, and not a forfeiture of all rights under the agreement. This construction is not only consistent with the scope of the language in relation to the court's determination as to the purpose of the enterprise envisaged by the writing, but it likewise is in harmony with the settled policy of the law not to enforce a forfeiture in the absence of a clear statement to that effect. [13] The principles governing this point are well stated in Nelson v. Schoettgen, 1 Cal.App.2d 418, 423 [36 P.2d 665]; "Forfeitures are not favored by the courts, and if an agreement can be reasonably interpreted so as to avoid a forfeiture, it is the duty of the court to avoid it. The burden is upon the party claiming a forfeiture to show that such was the unmistakable intention of the instrument. (Quatman v. McCray, 128 Cal. 285 [60 P. 855]; McNeece v. Wood, 204 Cal. 280 [267 P. 877]; 6 Cal.Jur. 362.) 'A contract is not to be construed to provide a forfeiture unless no other interpretation is reasonably possible.' (Hansen v. D'Artenay, 121 Cal.App. 746 [9 P.2d 889]; McPherson v. Empire Gas & Fuel Co., 122 Cal.App. 466 [10 P.2d 146]; Booth v. Los Angeles County, 124 Cal.App. 259 [12 P.2d 72].)"
 [14] A further matter to be considered in connection with the trial court's findings, as above recited, is the relationship existing between the parties pursuant to their agreement regarding their cooperative undertaking. In every contract there is an implied covenant that neither party shall do anything which will have the effect of destroying or injuring the right of the other party to receive the fruits of the contract, which means that in every contract there exists an implied covenant of good faith and fair dealing. (17 C.J. S. 778,  328.) [15] Within the purport of this equitable principle, *772 the defendant's conduct in withholding information regarding the fabrication of the roller-type press, its sale to the public and the application for a patent is a violation of the contract in letter and spirit. Since according to the evidence, the cooperative arrangement of the parties partook of the nature of a joint venture, the defendant owed to the plaintiff the duty of fair, open, honest disclosure, and it cannot by connivance, deceit or suppression of facts within the right or to the advantage of the plaintiff to know, secure or accept secret gains. (33 C.J. 851,  36; 15 R. C. L. 501,  3.) Accordingly, it is unconscionable for the defendant to suggest that because its president made individual application for letters patent covering the improved machine--a corporation not being able to file for patents, that being a personal privilege (35 U.S.C.A.,  33)--he may keep for himself the benefits flowing therefrom and the plaintiff's rights to the fruits of the contract are destroyed. The defendant's president executed the agreement on behalf of the defendant, with full knowledge of the implications therein contained, and accepted all the advantages attendant upon the plaintiff's demonstration and use of the original press. Such situation compels the conclusion that the defendant may not evade its contractual obligations by reason of a technicality in the patent law. Analogous in principle is the case of Hamer v. MacClatchie, 220 Cal. 720 [32 P.2d 620], an action for accounting and for recovery of unpaid royalties on certain patents. It was there said at page 724: "Furthermore, the evidence shows that the plans and ideas of these parties were freely exchanged for their mutual benefit. It fully justifies the finding that, under the terms of the agreement, the patent issued to defendant was held in trust by him for the benefit of both parties." In like manner the record here establishes the equities of the plaintiff's claim to participate in proportion to its agreed interest in the gains incident to the development of the improved press.
 [16] In summation of this branch of the case, it need only be said that the construction given the contract in suit by the trial court appears to be consistent with the true intent of the parties and where that is so, the appellate court will not substitute another interpretation though it seem equally tenable. (Adams v. Petroleum Midway Co., Ltd., 205 Cal. 221, 224 [270 P. 668]; Kautz v. Zurich Gen. A. & L. Ins. Co., Ltd., 212 Cal. 576, 582 [300 P. 34]; McNeny v. Touchstone, *773 7 Cal.2d 429, 435 [60 P.2d 986]; Slama Tire Protector Co. v. Ritchie, 31 Cal.App. 555, 562 [161 P. 25].)
 [17] The remaining points presented for consideration upon this appeal require but brief comment. First to be noted is the defendant's challenge of the sufficiency of the amended complaint's plea of performance by reason of the omission of the word "duly" in the allegation "That plaintiff has performed all conditions by it to be performed under said contract." (Code Civ. Proc.,  457.) In this connection the defendant urges that the strict rule of pleading followed with respect to a party's assertion of the bar of the statute of limitations according to the specific section and subdivision of the code (Code Civ. Proc.,  458; Overton v. White, 18 Cal.App.2d 567 [64 P.2d 758, 65 P.2d 99].) necessitates a like exactitude in the statement of the general allegation of performance permitted by the code. However, adoption of the defendant's theory as to the similarity of the statutory requirement regulating the method of pleading these respective matters as legal conclusions would not lend force to its present argument. The rule as to the proper plea of the statute of limitations is not self-operating but depends for its enforcement on the diligence of the plaintiff in objecting to the insufficiency of the plea either by demurrer to the answer or by timely objection at the trial. (Churchill v. Woodworth, 148 Cal. 669 [84 P. 155, 113 Am.St.Rep. 324], approved but distinguished on this ground in Overton v. White, supra, in affirming a judgment on the pleadings in favor of plaintiff.) On a like basis the defendant's charge of inadequacy of the amended complaint to raise the issue of performance is of no avail here where the record shows that the parties, pursuant to their respective positions, exhaustively litigated this subject during the course of the main trial, the court properly made specific findings on the matter, and the defendant did not urge the point of defective pleading until after the trial had been completed as to all questions except the supplemental accounting aspect of the case. (Code Civ. Proc.,  475.)
 [18] The defendant next contends that the terms of the judgment are so broad as to amount to a decree of specific performance rather than a declaration of the rights and duties of the parties under the contract. Particular objection is made to the recognition accorded the plaintiff's claim to the royalty payments and patent interests stipulated in *774 the agreement. The defendant urges that such adjudication, operating in futuro and contemplating the continuance of a personalized relationship between the parties for the stated time, contravenes the settled principle of equity that a contract for personal services extending over a long period will not be specifically enforced. (Civ. Code,  3390; Poultry Producers of Southern California, Inc. v. Barlow, 189 Cal. 278 [208 P. 93].) But the defendant mistakes the scope of the judgment rendered under authority of the declaratory relief act of this state, Code of Civil Procedure, sections 1060-1062a. Blakeslee v. Wilson, 190 Cal. 479 [213 P. 495].) The present case, involving an actual controversy between the parties, is the precise type of situation that the statutory remedy in question was designed to meet and accommodate. The judgment simply declares the rights and duties of the parties under the terms of the contract and limits the money award in favor of the plaintiff to the sum to which it was entitled as of the date of the hearing on the supplemental complaint in 1935. The fact that considerations of personal service are involved in the contract does not render the agreement an improper subject for declaratory relief (Blakeslee v. Wilson, supra; Lane Mortgage Company v. Crenshaw, 93 Cal.App. 411 [269 P. 672]; Herrlein v. Tocchini, 128 Cal.App. 612 [18 P.2d 73]; Holley v. Hunt, 13 Cal.App.2d 335 [56 P.2d 1240]) nor establish that such suit is governed by the rules relating to actions for specific performance. (Lane Mortgage Co. v. Crenshaw, supra, at p. 433.) The defendant's citation of Coykendall v. Jackson, 17 Cal.App.2d 729 [62 P.2d 746], does not strengthen its argument. That case merely decided that the trial court did not abuse its discretion in sustaining without leave to amend a demurrer to the plaintiff's complaint for declaratory relief. Consistent with the precise limitations of the question there presented for consideration, it is manifest that any language of that opinion purporting to intimate that a contract involving personal services because not specifically enforceable is likewise not a proper matter for declaratory relief is dictum and not controlling of the point here involved in view of the well-settled law on the subject of this statutory remedy, as above noted. It follows therefore that the trial court's treatment of the present case as one correctly brought under section 1060 of the Code of Civil Procedure and the form of its *775 judgment determinative of the points in litigation are unassailable.
 [19] The defendant finally complains of the excessiveness of the judgment in the following respects: (1) its designation of the press as a unitary structure rather than the pellet-making mechanism thereof as the basis for computation of the commission payments due the plaintiff from sales of the machine; (2) its declaration in the conjunctive rather than in the disjunctive of the plaintiff's right to a twenty per cent interest in all patents obtained upon the "pellet press," the "pellet mill press," and improvements on either. The first charge of error predicated upon the claim that the term "press," as used in the contract, meant only the extruding mechanism of the machine sold and did not embrace the "accessories"--the mixer, the heater, the feeder and the motor--is nullified by the testimony of the defendant's president. He stated that the entire machine was considered the press and sold as a unit, that the specifications in the advertising literature he authorized for circulation to various milling companies included the so-called "accessories" as integral parts of the press offered for sale to the public. In view of this evidence in support of the plaintiff's claim that the parties used the word "press" in reference to the whole machine, the fact that some essential operative part thereof was purchased by the defendant from an outside source rather than manufactured by it would not serve to defeat the plaintiff's right to the royalty payments stipulated in the contract. Consequently the defendant's objection to this feature of the judgment cannot be sustained.
 [20] As to the second charge of error--the declaration of the plaintiff's interest in the patents on the respective machines and improvements of either--the following quotation from the case of Homer Laughlin Engineers Corporation v. J. W. Leavitt & Co., 116 Cal.App. 197, 200-201 [2 P.2d 511], furnishes a complete answer: "We are of the opinion that it was within the province of the trial court to construe the contract from a reading of the whole thereof and, where any word or phrase was subject to different meanings, then such meaning should be given as would harmonize with the provisions of the instrument in its entirety and, in arriving at a true construction of the instrument, all of the surrounding circumstances should be considered. ... And there is almost an unanimity of holding to the effect that the terms *776 'and' and 'or' may be construed as interchangeable when necessary to effect the apparent meaning of the parties. (Arnold v. Hopkins, 203 Cal. 563 [265 P. 223]; Willis v. Robinson, 291 Mo. 650 [237 S.W. 1030, 1033]; Poehlman v. Leinweber, 288 Ill. 58 [122 N.E. 834]; Kales v. Houghton, 190 Cal. 294-298 [212 P. 21].)"
 For the foregoing reasons the judgment is affirmed.
 Gibson, C.J., Shenk, J., and Carter, J., concurred.
 TRAYNOR, J.
 I concur in the judgment. I do not agree with the premise implicit in the majority opinion that parol evidence as to the meaning of the contract was admissible only because the contract is ambiguous on its face. Words are used in an endless variety of contexts. Their meaning is not subsequently attached to them by the reader but is formulated by the writer and can only be found by interpretation in the light of all the circumstances that reveal the sense in which the writer used the words. The exclusion of parol evidence regarding such circumstances merely because the words do not appear ambiguous to the reader can easily lead to the attribution to a written instrument of a meaning that was never intended. (Cal. Code Civ. Proc.  1856, 1860; see Wigmore on Evidence 3rd ed.,  2458-2478; "The Theory of Legal Interpretation," 12 Harv. L. Rev. 417, by Oliver Wendell Holmes (then Chief Justice of Massachusetts.)
 Edmonds, J., concurred.
