OPINION,
Me. Chief .Justice Paxson :This record presents two questions, viz., (a) what was the contract between McCauley Brothers and the Chartiers Oil Company ? and (5) was the contract substantially performed by McCauley Brothers ? The first of these questions the court below submitted to the jury, for the reason that the contract was oral. The law is well settled that where a contract is in writing, its construction is for the court; where it is oral, it is for the jury: McFarland v. Newman, 9 W. 59; Sidwell v. Evans, 1 P. & W. 386. The second question was necessarily for the jury. They have determined both in favor of the plaintiffs, and, unless there be error in the manner of their submission, the judgment must stand. . “
The first three assignments of error are to the rejection of certain testimony offered on the part of the defendant. As to the offers embraced in the first and second assignments, we are unable to see their relevancy. The contract, as claimed by Mc-Cauley Brothers and as found by the jury, was to sink an oil-well at the price of $1.75 per foot, without specifying the depth. The well was drilled to a depth of about 2,400 feet and until it had passed from seventy to eighty feet through what is known as the Gantz sand, when the tools were lost and could not be recovered. The garnishee company appear then to have taken possession of the well, tubed it, and pumped two thousand or more barrels of oil therefrom. The attaching creditors, representing the contractors, claimed that there had been a substantial compliance with the contract; the oil company claiming that the contract was entire, and that there was no such compliance therewith as would entitle McCauley Brothers to recover. Under this state of facts, we are unable to see the relevancy of the testimony referred to. The claim on behalf of McCauley Brothers was to recover the contract price of sinking the well, less such deduction for damages as would compensate the company for any loss sustained by it on account of the failure of McCauley Brothers to remove the tools from *559tbe bottom of said well. It is obvious, therefore, that an inquiry into the average cost of drilling a well in 1886 could not have thrown any light upon the issue before the jury. Its only effect would have been to mislead them.
The evidence referred to in the third assignment was competent, and, had the company offered to prove it by a competent witness, the learned judge would have admitted it. He excluded it on the ground that the witness on the stand had no personal knowledge of the facts he was called to testify to. All his knowledge was derived from his superintendent who had made the measurements.
The remaining assignments allege error in the answers to the points submitted by the respective parties. Although presented in different forms, they all raise the single question, was there a substantial compliance with the contract ? The plaintiffs’ fourth point called upon the court to instruct the jury as follows.
“ If the jury find from the evidence that McCauley Brothers drilled an oil well for the defendant company to such a depth as answered the intended purpose, and that the well was taken possession of by the defendant, and was used for the production of oil, then the plaintiffs are entitled to recover the contract price for the drilling of the said well, less such deduction for damages as will compensate the defendant company for any loss sustained by it on account of the failure of McCauley Brothers to remove the tools from the bottom of said well.”
This poinfethe learned judge below affirmed. The rule upon this subject may be found in Danville Br. Co. v. Pomroy, 15 Pa. 159: “ Where a thing is so far perfected as to answer the intended purpose, and it is taken possession of and turned to that purpose by the party for whom if was constructed, no mere imperfection or omission, which does not virtually affect its usefulness, can be interposed to prevent a recovery, subject to a deduction for damages consequent upon the imperfection complaiued of. Of course, the indulgence is not to be so stretched as to cover fraud, gross negligence, or obstinate and wilful refusal to fulfil the whole engagement, or even a voluntary and causeless abandonment of it.” This rule was cited and approved in Pepper v. Philadelphia, 114 Pa. 96, and in other cases.
*560It was urged, however, that the recent case of Gillespie Tool Co. v. Wilson, 123 Pa. 19, is in conflict with this view. We do not so regard it. In that case there was a wilful departure from the terms of the contract in several respects, as will readily be seen by the following extract from the opinion of Mr. Justice Stekrett: “In several particulars the work contracted for was not done according to the plain terms of the contract. Nearly one half of the well was not reamed out, as required, to an eight-inch diameter, so as to admit five and five eighths inch casing in the clear. About 180 feet of the lower section of the well, also, was bored four or four and one quarter inches, instead of five and five eighths inches in diameter. In neither of these particulars, nor in any other respect, was there any serious difficulty in the way of completing the work in strict accordance with the terms of the agreement.” The difference between that case and this is so obvious that extended comment is unnecessary. In the former there was a wilful departure from the terms of the contract, for. which no excuse or justification was offered. In this case there appears to have been no such departure. The jury have found that the well had been drilled to a proper depth, and the only omission was to fish up the tools from the bottom of the well, which, the evidence shows, the contractors were unable to do. The loss of the tools in this manner was a matter which might occur to any contractors. The well, as drilled, was a producing well, and the jury were properly instructed to deduct from fhe contract price any loss or damage which the company sustained by reason of the tools remaining therein.
Judgment affirmed.