after stating the case: The decisive question in this case is, what is the meaning of the contract? The object of all rules of interpretation is to arrive at the intention of the parties, and where the terms of the agreement have been'reduced to writing, so that there is no dispute as to what they are, and they are so framed as to admit of construction, the intent must be gathered from a consideration of the entire instrument, the problem being, not what any part of the contract taken separately may mean, but what is the meaning of the contract when every part is given its legitimate effect. R. R. v. R. R., 147 N. C., 382; Simmons v. Groom, 167 N. C., 271; Spencer v. Jones, 168 N. C., 291. We think that there is but one meaning to he deduced from the words of this contract, which is, that it was intended to provide for two contingencies. The first was that the proceeding should be conducted to its end, as contemplated by the statute, so that the drainage district would be fully established and the proceeding terminated in a final adjudication, or decree of confirmation, upon which depended the issuance of the bonds. If this event occurred, the engineering company should receive $1,500 for its services, under the Lewis and Horton contract, and $900 and $700 under the E. L. Davis contract. The second contingency was that the proceeding might stop short of a final decree, by a dismissal, in which event it was provided that petitioners and their sureties would be bound to pay the sum of $400 (or $250 by the other contract), within the time specified, for services rendered up to and including the preliminary report. The engineering company assumed the risk of the proceeding being stopped before reaching its final stage, when the bonds would be issued. It seems evidently to have been the purpose that the $1,500 and $900 should be paid out of “the first proceeds from the sale of drainage bonds,” and not by the petitioners. The learned counsel who argued the case so well in this court for the engineering company suggested that the requirement that the first payment should come out of the bonds is not conclusive as *104to tbe intent, and tbis may be so, and we are so treating it, but it is tbe strongest bind of evidence as to wbat was tbe true meaning of tbe parties. Tbe proposal was tbat tbe company, or its assignor, would do tbe whole work for tbe specified amount and rely for compensation on tbe proceeds of the sale of bonds, and tbis offer was accepted by tbe petitioners. Tbis part of tbe contract was clearly intended to exclude tbe idea of any personal responsibility of tbe petitioners for so large an amount, and there was no good reason why they should assume it. If tbe event upon tbe happening of which it was provided tbat tbe money should be paid and in a particular way bad taken place, tbe money would have been paid out of tbe fund designated for tbat purpose. But it failed to occur, because tbe proceedings were dismissed, and tbe other event bad happened', which fixed tbe liability of tbe petitioners at tbe smaller sums, or $400 and $250. If tbe enterprise succeeded throughout as designated at tbe beginning of it, tbe district would take tbe burden of paying for the- work out of its bonds, but if it failed, by reason of a dismissal and before tbe final conclusion of tbe matter, tbe petitioners thought it fair, as there was no other way of payment, tbat they should undertake to pay for the preliminary work; and tbis is all of their obligation, in tbis view of tbe ease. Whether tbe petitioners were liable for tbe reasonable value of tbe services performed after tbe preliminary report was filed, we need not decide, as tbe company has received a judgment upon tbe theory that it was so entitled to recover, and tbe petitioners have not appealed.
Tbe terms of the contract are broadly stated, viz.: “In case tbe action to establish the drainage district is dismissed by.the clerk of tbe court, tbe $400 (and $250 in tbe second contract) should be paid out of tbe fund of tbe petitioners.” While in tbe other, or first event named, tbe $1,500 (and $900 in tbe other contract) should be paid “out of tbe first proceeds from tbe sale of drainage bonds.” When we compare, or contrast, tbe two classes, it appears clearly, we think, tbat tbe method of payment was intended to indicate who should be liable for tbe different amounts. Tbe use of tbe word “dismissed,” without qualification, and in a general sense, shows tbat dismissal of any kind was intended. In other words, if tbe proceedings failed of their purpose, and. were dismissed for any cause, tbe petitioners should pay $400 and $250, and their bondsmen should he liable with them. The proceedings were dismissed, and there has been no reversal of that judgment. If it was erroneous in law, it could he attacked only by an appeal, and, if irregularly entered, by a motion to set it aside. It is not contended tbat it was void, so tbat it can be assailed collaterally. When the clerk denied tbe motion of tbe engineering company to tax petitioners and their sureties with the amount of their claim ($3,350), bis judgment was reversed, *105and the order of reference made. This had nothing to do with the prior dsimissal of the proceedings, but supervened, and was based upon the judgment of dismissal.
The -appellant has excepted to the referee’s finding of fact, but they have been approved and confirmed by the judge upon evidence, and we do not in such case review the finding. Cooper v. Middleton, 94 N. C., 86; Harris v. Smith, 144 N. C., 440; McCullers v. Cheatham, 163 N. C., 63. Besidés, the order of reference was by consent and at appellant’s request, and it was stated therein that the findings of fact should be conclusive.
In discussing the case, we have not referred specifically to the contract for the drainage of District No. 1 along Middle Swamp, but the contracts are all alike in substance, and we selected the two contracts first mentioned in the case. The same reasoning extends to all of them, and our conclusion as to each is, therefore, the same.
There are numerous exceptions and assignments of error, but we need not refer to any but those already considered. The main question in the case involves the construction of the contract, and a decision as to this sufficiently covers the ease. We have kept within the limits of the appellant’s brief, as we are required to do by the rule of this court. The statutes relating to the subject of drainage have been kept constantly in view, but we do not think that any of their provisions should induce us to give a different meaning to the contract.
Affirmed.