The issue was raised by the traverse of the return to a writ of alternative mandamus and the question to be decided by the trial in the Common Pleas was whether a payment directed by councils to be made to contractors for extra work, included items which the contractors were required to furnish under the contract with the city for the consideration therein named. See Cunningham v. Dunlap, 242 Pa. 341. It was admitted that the labor for which a claim was made was furnished and that the price charged was reasonable but it was contended that the trial judge should have decided as matter of law, in view of the specifications, that the work came under the terms of the contract and was not extra, work.
Generally it is the duty of the court to determine the meaning of a written contract and if the question had been that of construction merely of an unambiguous written contract the judge should have decided it. But it was not. The work undertaken by the city comprised the furnishing of pipe, the digging of trenches and laying of pipe for its filtration system. There were one hundred and eighty-eight specifications including the whole work and they were prepared, in the words of the written notice to bidders, “mainly to fit case of the entire work of furnishing and laying the pipe being awarded to one contractor.” A part only of this work, the digging of trenches and laying of pipe, was awarded to the plaintiffs but they were required to do much work clearly outside of their contract and they did it by direction of the engineer of the department with the expectation on their part and on his that they would be, paid for it as additional work. An instance is the work of testing pipe, *184the cost of which is the largest item of their claim. This was clearly the duty of the person who furnished the pipe and the cost thereof was expressly included in his bid. Because of defective plans, unforeseen difficulties arose and during the progress of the work it became necessary to change the method of doing it and to make numerous departures from the contract by which additional work and expense were imposed on the plaintiffs. To what extent the work done because of these departures was extra work cannot be determined by construction of specifications which applied only in part to the plaintiffs. It was a question for the jury and it was submitted with clear and adequate instructions.
The second contention of the appellant is that the jury should not have been permitted to make an allowance in the nature of damages for the detention of the money appropriated and directed to be paid the plaintiffs by ordinance of councils approved by the mayor. While there were legal objections to the plaintiffs’ claim for payment for extra work not covered by the written contract there was a moral obligation on the part of the city to pay it which became a legal obligation when its payment was assumed and directed in the manner provided by law, and for its unjustifiable detention after that time the plaintiffs were entitled to compensation.
The judgment is affirmed.