(d) Agreement. As used in section 281 and 1.281-2 the term agreement means a written contract, entered into before the beginning of the terminal railroad corporation's taxable year in question, to which all shareholders of the terminal railroad corporation are parties. The fact that other railroad corporations or persons are also parties will not disqualify an agreement. Section 281 applies only if, and to the extent that, the reduction of the liability or charge that would be made, as described in paragraph (c) of 1.281-2, results from the agreement. Thus, where the other conditions of the statute are met, section 281 applies if a written agreement, to which all of the shareholders were parties and which was entered into prior to the beginning of the terminal railroad corporation's taxable year, provides that the net revenues of the terminal railroad corporation are to be applied as a reduction of what would otherwise be the charge for the taxable year for related terminal services provided to the shareholders. Similarly, section 281 applies, where its other requirements are fulfilled, if the agreement provides that the net revenues are to be credited against rental obligations resulting from related terminal services furnished to shareholders. However, section 281 does not apply where the agreement provides that the net revenues are to be divided among the shareholders and distributed to them in cash or held subject to their unconditional right of withdrawal instead of being applied to the computation of charges, or in reduction of liabilities incurred, for related terminal services.