This was a suit brought by James IIealy, surviving partner of James IIealy & Bro., said firm consisting originally of James IIealy and John IIealy, before a justice of the peace of Ohio county for the recovery of money claimed to be due on contract, in which the plaintiff'demanded a judgment for $197.00 against the Natural Gas Company of West Virginia. Said firm had a contract with said company to dig ditches for pipes, and to fill them after the pipes were put down along certain streets and alleys in the city of Wheeling, and they were to remove stone where said ditches were dug in paved streets, and replace' them when the ditches were filled up, for which removal and replacing of said stones they claimed they were to be paid thirteen cents per lineal foot. They also claim that they were prevented by said gas company from replacing part óf the stones so removed by them, and that other parcels of stone removed were not required by the city to be replaced, but the account, upon which the plaintiff' sued, was for removing and replacing said stones for 3,690 feet. The defendant claimed a set-off amounting to $297.29, for repairing certain portions of said work, which it claimed had been done in a defective manner by said Healy & Bro., and filed an itemized account thereof, and on the 16th day of April, 1888, the plaintiff demanded a trial by a jury of six men, which resulted in *104a verdict for the plaintiff for the full amount of their claim —$197.00. A motion was made by the defendant to set aside the verdict, on the ground that it was contrary to the law and the evidence, which motion was overruled, and judgment was rendered upon said verdict. Notice was given, that a writ of certiorari would be applied for, and a bill of exceptions was taken and made apart of the record. On the 29th day of May, 1888, the Natural Gas Company of West Virginia presented its petition to the Circuit Court of Ohio county praying a writ of certiorari to said judgment, which writ was awarded; and on the 15th day of December, 1888, said case was heard before said Circuit Court on the petition of the plaintiff, the defendant’s demurrer thereto, the plaintiff’s joinder therein, the writ and return of the justice who tried the case, the claim of the plaintiff, and set-off and statement of defence by the defendant before said justice, the transcript of the record of said justice sent up in answer to the writ, the bill of exceptions, and the exhibits therein referred to, signed and certified by said justice for the defendant below; and upon consideration the court overruled said demurrer, set aside the verdict and reversed the judgment of s'aid justice and dismissed the action of the plaintiff, Healy, with costs, from which judgment the said James Healy applied for and obtained a writ of error to this Court.
In ascertaining the duties of the Circuit-Court with reference to a case brought before it on a writ of certiorari we find, that section 3 of chapter 110 of the Code after providing for bills of exception and a -certificate of the evidence by the justice says : “Such certificate of evidence and bills of exception shall be a part of the record, and as such be removed and returned to the Circuit Court. Hpon the hearing such Circuit Court shall, in addition to determining such questions as might be determined upon a certiorari, as the law heretofore was, review such judgment, order, or proceedings of the county court, council,'justice, or other inferior tribunal, upon the merits, determine all questions arising on the law and evidence, and render such judgment, or make such order upon the whole matter, as law and justice may require.”
*105In 4 Minor’s Institutes, 300, the author says: “A writ of certiorari is a writ issued from a superior court to one of inferior jurisdiction, commanding the latter to certify to the former the record or proceedings in a particular case. When the record or proceedings are thus certified to the court which awards the writ, sundry uses may be made of the possession thereof, thus: (1) The cause may be removed just as itis to the court issuing the writ, not to be there reviewed, but to be thenceforward proceeded with in that court as if it had originated there. (2) The cause may be removed where the proceedings are summary, and not according to the course of the common law, in order that the court issuing the writ may inspect the proceedings, and determine whether there has been any material irregularity therein,” etc.
In the ease of Dryden v. Swinburne, 20 W. Va. 89, which was a writ of error to- a judgment of the Circuit Court of Kanawha county, rendered on the 19th day of December, 1879, before the powers of the Circuit Court upon a writ of certiorari were so materially enlarged by the acts passed March 27, 1882, Judge Green, in delivering the opinion of the Court, (page 107) says : “Upon a review of the authorities I conclude that a writ of certiorari issued by a superior court after final judgment of the inferior court brings up for review and correction not only errors and defects which affect the jurisdiction of the inferior tribunal, but all errors of law in the record, including all action taken on evidence before it, and on erroneous principles, or any action taken by it in the absence of all evidence to justify such action. This conclusion is sustained both by reason and the overwhelming weight of authority.”
In the case of Biggs v. City of Huntington, 32 W. Va. 55, (9 S. E. Rep. 51) which case originated before a justice of Cabell county and was brought before the Circuit Court of said county on a writ of certiorari, Judge GREEN, again delivering the opinion of the Court, says, p. 65: “But all the members of our’Court are of opinion that the Circuit Court did err in dismissing the action of the plaintiff, and rendering a judgment in favor of the defendant against the plaintiff for its costs, including five dollars allowed by statute. The verdict of the jury having been set aside, no judgment *106could properly be rendered until the case has been again tried by a jury, either before a justice or before the Circuit Court.”
In'the case under consideration the verdict was ‘set aside, and the judgment of the justice was reversed and annulled, and the court found for the defendant, and dismissed the plaintiff’s action; and, under the ruling in the case of Biggs v. City of Huntington, supra, this judgment would be clearly erroneous, and the case must be remanded for the purpose of being properly tried by a jury, unless a trial by jury is waived by the parties.
As before stated, the defendant filed an offset before the justice in this case, the’items aggregating $297.29, made up of charges for repairing work, Avh-ich, they claim, had been defectively and imperfectly done by said Healy & Bro., and offered to prove said account before the'jury, but the justice refused to 'allow any proof of said items to go to the jury, although the'items of the plaintiff’s claim were made up of charges against the defendant for portions of said 'work claimed by defendant to have been done in a defective and imperfect manlier. This ruling of the justice seems to me to be erroneous. While it is true, that a defendant can not recoup damages by way of set-off in excess of the plaintiff’s 'claim, yet under the circumstances of this case the defendant had a -right to show by proper evidence, if it could, that the plaintiff'had not performed the work in a workman-likc-■manner. It is claimed by the plaintiffs, that the work ivas approved and- received by the party, who by the terms of the’contract was to accept and be satisfied With it. The fact however, that said work had been accepted by said superintendent, would not be conclusive upon the defendant, if there were latent defects in the work dr any concealment in regard to its character by the parties, who performed the work. The question, whether the work was approved and accepted, is a question of fact for the jury, as is also the question as to the character of the work and the manner in which it was performed; and I am satisfied, that the justice committed an error in refusing to allow proof to go to the jury in regard to the amount required to be expended by the defendant in perfecting and completing the work which the ^plaintiffs had contracted to do.
*107Iu‘the ease of Leonard v. County Court, 25 W. Va. 45, said Leonard appears to have contracted for the construction of a bridge, and although the bridge had been received and paid for by the county, yet, when it was found to be defective, a suit was instituted and maintained against the contractor and his sureties for the damages sustained by said county in making good the defects in said bridge. The case was twice before this Court and will be first found in 16 W. Va. 470.
The defendant also offered to prove, by one J. M. Todd, that, while one Coon Leonhart was doing said paving for Healy & Bro., plaintiffs, said Todd called the attention of said Leonhart to the inferior manner, in which it was being done, — the cobble stones being' put down upon the clay,— and that said Leonhart'replied to witness, that it was good enough for the pay he was receiving for it, and continued his work in the same way; which evidence was objected to by the defendant, and the objection sustained. It will be preceivcd, that in the examination of said Leonhart no foundation was laid for said question by asking'him, if he did not use the language attributed to him to said witness Todd ; and I do not think the justice committed an error in sustaining said objection.
As to the question asked J. A. Lambing as to the contract, which, he said, he saw Mr. John Healy and Mr. James Healy sign, and which reads on the third page of it near the bottom : “And it is understood and agreed by the parties hereto that, for the additional sum,” etc., whether that was the contract as made, and if not what was the contract, which question was objected to, and the objection sustained, the justice committed no error in sustaining said exception, because the writing itself was the best evidence of what it contained.
I think however that said justice erred in refusing to allow the witness, James Piatt,- to state, whether or not he had ever had any occasion to do over again any of the work which said Healy had done, and in also refusing to allow said defendant to prove by said Piatt and James Todd, that, where ditching has been done and paving upon the ditching, it is impossible in the majority of cases to detect, whether *108it had been done in an unworkman-like manner until after tbe lapse of several months ; and in refusing to allow the question indicated to be asked to draw out said answer.
The justice also erred in rejecting any evidence as to the items contained in the papers marked: “McCarty, No. 1,” and “McCarty, No. 2,” and “J. W. Warden, No. 1,” as they seem to be merely accounts of work done by the Natural Gas Company and board of public works in repairing work originally done by the plaintiffs.
This disposes of the questions raised by objection to the testimony at the time of the trial before the justice. The Circuit Court, we think, committed no error in awarding the writ of certiorari, or in overruling the demurrer to the petition for the same ; but for the reasons hereinbefore stated the judgment of the Circuit Court must be reversed, and the case remanded to said Circuit Court for further action in accordance with the principles herein indicated, and for such proceeding as the law directs.
Reversed. RemaNded.