
177 Cal.App.3d 942 (1986)
223 Cal. Rptr. 392
MOBIL OIL CORPORATION et al., Plaintiffs and Appellants,
v.
EXXON CORPORATION et al., Defendants and Respondents.
Docket No. A020663.
Court of Appeals of California, First District, Division Four.
February 24, 1986.
*944 COUNSEL
Pillsbury, Madison & Sutro, William C. Miller, Walter R. Allan, Reginald D. Steer, Donald E. Peterson and Edward V. Anderson for Plaintiffs and Appellants.
Barry L. Wertz, Risher M. Thornton, Michael E. Arruda, John Briscoe, David Ivesten, Washburn & Kemp, Paul R. DeStefano, McCutchen, Doyle, Brown & Enersen, Richard Murray, Lynn H. Pasahow, Terry J. Houlihan, James B. Lewis, Gail K. Hillebrand, Amy J. Markowitz and Elizabeth A. Birch for Defendants and Respondents.
OPINION
SABRAW, J.
Plaintiffs appeal from a judgment on the pleadings dismissing their complaint for declaratory and injunctive relief. We reverse.

I. Facts and Procedure
Plaintiffs and defendants own leases in Alaska's Prudhoe Bay petroleum reservoir, which contains about 10 billion barrels of recoverable oil and 27 trillion cubic feet of recoverable gas. Ownership is primarily in three groups: group one, plaintiffs Mobil, Phillips and Chevron own leases in the western portion of the reservoir; group two, defendants Exxon Corporation and Atlantic Richfield Company-Arco Alaska, Inc., hold leases in the eastern portions of the reservoir; and group three, defendants Sohio Petroleum Company-Sohio Alaska Petroleum Company and BP Alaska Exploration Inc., own leases in the central portion of the reservoir. (Throughout this opinion, "defendants" refers to groups two and three.)
These three groups entered into a contract dated April 1, 1977, entitled the Prudhoe Bay Operating Agreement (the contract) to jointly operate the reservoir and share in the oil and gas removed on the basis of each group's hydrocarbon pore volume (HPV), which is generally the volume of oil and gas contained underground in the pores of the rock. Because it was not possible to adequately determine HPV on the basis of data available in 1977, the contract provided for redetermining HPV twice, the final redetermination to occur by January 1, 1982. The contract called for binding arbitration on redetermination of HPV if the parties failed to reach an agreement by that date.
January 1982 passed with no agreement; all three groups had proposed different methods of determining HPV. Negotiations continued until late February 1982, at which time defendants (groups two and three) broke off negotiations with plaintiffs (group one). Defendants thereafter agreed among *945 themselves: (i) to settle their redetermination dispute; (ii) to accept a specified method of redetermining HPV for all groups; (iii) to make group two "primarily responsible" for preparing and presenting the arbitration case against group 1; and (iv) "to be forever bound ... to participation in the ... Prudhoe Bay [project] in ... the same relative proportion to each other as agreed to herein, regardless of any future negotiations, arbitration or other manner by which the subject redeterminations are ultimately concluded." (Italics added.) In other words, as defendants admit, their side agreement provided that whatever HPV share remained after plaintiffs' share was eventually established through whatever means would be divided according to an agreed ratio among themselves. Defendants then sent plaintiffs a joint and final HPV redetermination offer that was, apparently, refused, and the matter proceeded to arbitration.
The contract provided that each of the three groups would be able to nominate three qualified arbitrators; each of the groups could veto one nominated arbitrator; and of the remaining six nominees, five would be selected at random to form the arbitration board, and one would serve as an alternate. The contract also provided that arbitration would be limited to those groups "affected" by a common dispute.
Despite their side agreement  under which, plaintiffs observe, group three would benefit most not from adoption of the "best" technical method from calculating HPV, but from adoption of any method that would most minimize plaintiffs' HPV share[1]  groups two and three proceeded as if there were still three sides to the arbitration: Group two petitioned for arbitration not only against plaintiff but also against group three, and group three filed a response to group two's request for arbitration that agreed with every position of group two.[2]
Plaintiffs sued to enjoin group three from nominating arbitrators. Because the controversy to be arbitrated concerned the technical method for redetermining HPV, and because group three had in essence agreed to be bound by whatever redetermination method group two would select, plaintiffs argued group three was no longer an affected party and had no standing to nominate arbitrators. Alternatively, plaintiffs claimed the contact is ambiguous as to whether arbitration was intended to permit group three's participation under these circumstances and, therefore, plaintiffs should have been allowed to adduce evidence of intent in this regard. Finally, plaintiffs maintained *946 the side agreement between defendants violated their duty of good faith and fair dealing. Defendants demurred and moved for judgment on the pleadings. The trial court overruled the demurrer but granted the motion for judgment on the pleadings without allowing extrinsic evidence on the interpretation of the contract and denied plaintiffs' motion for a preliminary injunction. Arbitration began in May 1983 and was completed in September 1985. Court confirmation of the arbitration award has been stayed by the San Francisco Superior Court.

II. Analysis
As mentioned above, the contract restricts arbitration participation to those "affected" by the matter to be arbitrated. Plaintiffs first claim that by virtue of defendants' side agreement, group three has no right to participate in the arbitration because it will not be affected by the HPV redetermination.
As explained above, groups two and three agreed in their side agreement to be bound "in the same relative proportion to each other as agreed ... regardless of any future negotiations, arbitration or other manner by which the subject redeterminations are ultimately concluded." (Italics added.) Plaintiffs seize on this language, and on the side agreement's further provision that group two will be primarily responsible for presenting defendants' arbitration case. They argue that, in a real sense, group three's interests have merged with those of group two. Indeed, by virtue of the side agreement, a question is raised whether there remains any arbitratable controversy between those two groups: Group three has thrown its chips into group two's pot; group two is apparently advocating a technical method of redetermination that is different from group three's former position and that would lead to a lesser percentage share for plaintiffs than they would have received under group three's former position. As plaintiffs told the court below, the side agreement has allowed group three to "simply [forget] about their [previous] views on what is the best technical approach [to redetermining HPV] and lie back in hopes that their bet on [group two] comes in for them." Plaintiffs conclude that because group three has agreed to be bound by whatever method of redetermination is advanced by group two it is no longer a party "affected" by a common dispute under the arbitration terms of the contract and therefore it has no standing to participate in the arbitration.
Defendants, on the other hand, argue that group three will remain affected by the arbitrators' redetermination decision because its HPV share will be *947 enhanced or reduced depending on what technical method is selected to determine plaintiffs' HPV share.
We must decide the propriety of a trial court using its own interpretation of a contract as the basis for granting a judgment on the pleadings without allowing an opportunity for extrinsic evidence from the parties on the issue of their intent.
(1) First we observe that on a motion for judgment on the pleadings "... the facts alleged in the complaint must be assumed to be true and liberally construed in favor of the party against whom the motion is made." (Gabaldon v. United Farm Workers Organizing Committee (1973) 35 Cal. App.3d 757, 759 [111 Cal. Rptr. 203].)
(2) Next for guidance on the use of extrinsic evidence we turn to Pacific Gas & E. Co. v. G.W. Thomas Drayage etc. Co. (1968) 69 Cal.2d 33 [69 Cal. Rptr. 561, 442 P.2d 641, 40 A.L.R.3d 1373], at page 37 where Chief Justice Traynor speaking for our Supreme Court emphasized the importance of admitting extrinsic evidence by trial courts in interpreting written instruments: "The test of admissibility of extrinsic evidence to explain the meaning of a written instrument is not whether it appears to the court to be plain and unambiguous on its face, but whether the offered evidence is relevant to prove a meaning to which the language of the instrument is reasonably susceptible. [Citation.]
"A rule that would limit the determination of the meaning of a written instrument to its four-corners merely because it seems to the court to be clear and unambiguous, would either deny the relevance of the intention of the parties or presuppose a degree of verbal precision and stability our language has not attained.
".... .... .... .... .... .... .
"Although extrinsic evidence is not admissible to add to, detract from, or vary the terms of a written contract, these terms must first be determined before it can be decided whether or not extrinsic evidence is being offered for a prohibited purpose. The fact that the terms of an instrument appear clear to a judge does not preclude the possibility that the parties chose the language of the instrument to express different terms. That possibility is not limited to contracts whose terms have acquired a particular meaning by trade usage, but exists whenever the parties' understanding of the words used may have differed from the judge's understanding.
(3) "Accordingly, rational interpretation requires at least a preliminary consideration of all credible evidence offered to prove the intention of the *948 parties. (Civ. Code, § 1647; Code Civ. Proc., § 1860; see also 9 Wigmore on Evidence, op. cit. supra, § 2470, fn. 11, p. 227.) Such evidence includes testimony as to the `circumstances surrounding the making of the agreement ... including the object, nature and subject matter of the writing ...' so that the court `can place itself in the same situation in which the parties found themselves at the time of contracting.' (Universal Sales Corp. v. California Press Mfg. Co., supra, 20 Cal.2d 751, 761; Lemm v. Stillwater Land & Cattle Co., supra, 217 Cal. 474, 480-481.) If the court decides, after considering this evidence, that the language of a contract, in the light of all the circumstances, `is fairly susceptible of either one of the two interpretations contended for ...' (Balfour v. Fresno C. & I. Co. (1895) 109 Cal. 221, 225 [41 P. 876]; [citations]), extrinsic evidence relevant to prove either of such meanings is admissible." (Footnotes omitted.)
Accordingly, the meaning of a writing "... can only be found by interpretation in the light of all the circumstances that reveal the sense of 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. [Citations.]" Universal Sales Corp. v. Cal. etc. Mfg. Co. (1942) 20 Cal.2d 751, 776 [128 P.2d 665].
(4) The defendants' motion for judgment on the pleadings called upon the trial court to interpret whether group three was a party "affected" by the arbitration and hence whether they should have been allowed to nominate arbitrators. Plaintiffs contended that the contract was ambiguous and was never intended to cover the situation in which there were merely two contending parties disputing the issue of HPV. Further, that in the event of arbitration it was intended the three groups would enter on equal footing and nominate arbitrators accordingly. Defendants' side agreement effected a realignment of the parties. This realignment needed to be taken into consideration in interpreting the arbitration provisions as to who was an "affected" party and the number of nominees available to each group. Plaintiffs protested that they had not been permitted to complete their discovery which was necessary in developing evidence on the intent of the parties and therefore the granting of a judgment on the pleadings would foreclose the opportunity to present evidence on the interpretation of the arbitration provisions. The trial court concluded "the fact is they're [group three] going to be affected by the determination [arbitration] and therefore under this Agreement they've been given the right to nominate a third of the arbitrators." And based on this conclusion, judgment on the pleadings was granted. An opportunity should have been given to introduce extrinsic evidence to assist the court in interpreting and applying the arbitration provisions to the facts of this case. Judgment on the pleadings was therefore error.
*949 For yet another reason we would reverse the judgment here. "In every contract there is an implied covenant of good faith and fair dealing that neither party will do anything which injures the right of the other to receive the benefits of the agreement." (Brown v. Superior Court (1949) 34 Cal.2d 559, 564 [212 P.2d 878]); see also Egan v. Mutual of Omaha Ins. Co. (1979) 24 Cal.3d 809, 818 [169 Cal. Rptr. 691, 620 P.2d 141]; Jacobs v. Freeman (1980) 104 Cal. App.3d 177, 188-189 [163 Cal. Rptr. 680]). Plaintiffs' complaint alleged defendants acted in bad faith (1) in attempting secretly to allow group two to be primarily responsible for preparation and presentation of the arbitration while (2) ostensibly seeking relief from group three as a "respondent" so that (3) defendants could select six of the nine potential arbitrators.
Plaintiffs argue that in light of the side agreement, group three's insistence on nominating arbitrators and otherwise participating as a "respondent" in the arbitration proceeding would reasonably support a finding that defendants are in violation of the covenant of good faith and fair dealing. Plaintiffs should have been allowed to present evidence in support of their position that defendants were expected to proceed to arbitration and advocate their own independent views, and not be bound by a prior agreement that allegedly stacked the deck against plaintiffs. As observed in Eagan, supra, "[t]he precise nature and extent of the duty [of good faith and fair dealing] ... will depend on the contractual purposes." (24 Cal.3d at p. 818.) Under the circumstances of this case, a determination as to whether the contractual purposes of the arbitration agreement have been met could not properly be made at the pleading stage.
We reject defendants' equitable plea to let the arbitration proceed because of the time and money expended; defendants freely accepted the risk that arbitration might be invalidated when they decided to proceed as they did.
Judgment is reversed and remanded for further proceedings in conformance herewith.
Poche, Acting P.J., and Channell, J., concurred.
On March 11, 1986, the opinion and judgment were modified to read as printed above. A petition for a rehearing was denied March 26, 1986. Poche, Acting P.J., was of the opinion that the petition should be granted. Respondents' petitions for review by the Supreme Court were denied May 1, 1986. Lucas, J., did not participate therein.
NOTES
[1]  This is so because, under the side agreement, the HPV share that will go to group three is locked into group two's eventual HPV share, and the only variable is the HPV share that will go to plaintiffs.
[2]  Group two's petition disclosed the fact that defendants had reached a separate agreement without disclosing details of the agreement.
