delivered the opinion of the court.
The defendants in error brought suit before W. F. Cross, mayor of the town of Lexington, against one Barger as survivor, and against the said W. F. Cross and another, as executors of one Sheppard, the decedent and Barger having been partners in the lifetime of the former. The defendants pleaded a set-off in favor of Sheppard & Barger, and when the case came on for trial, Cross declined to sit, and it was agreed by all the parties that one Cochrane, another justice of the peace in that county, should be sent for, and asked to try the cause. Coch-rane came, and, with the full consent of all parties and their counsel, tried the case in the room where Cross holds his courts, and made entry of his judgment on Cross’s docket. Cochrane rendered judgment against the plaintiffs in that court, and they appealed to the Circuit Court. When the case was called for trial in the Circuit Court, M. Levy & Co., the plaintiffs, who had instituted the suit before Cross, and had consented that Cochrane should try the case instead of Cross, moved to have the suit dismissed, because of the trial before Cochrane, and the Circuit Court sustained their motion. From that judgment Cross and the other defendants sued out this writ of error.
It is now insisted, on behalf of M. Levy & Co., that the consent gave no jurisdiction to Cochrane to try the cause; that the statute (Code 1871, § 1340) required a transfer of the case to the nearest justice of the peace, Cross being interested, and that this was the only mode in which the cause could be *636tried. We do not regard this position as just. The object of the statute, in requiring the transfer, was to have the case tried by an impartial and disinterested justice of the peace. This object was as well attained by the justice of the peace trying the case at the place agreed on by the parties as in his own court. These parties were competent to make the agreement to substitute Cochrane in lieu of Cross. Having done so, and gone into the trial, they will not be heard now to say that an actual transfer should be made, as they have secured all the benefits of such transfer. Reversed and remanded.