BARNARD, P. J.
The case of Helmke against the defendant (21 N. Y. Supp. 345) is similar in principle with this case, and would be covered by the decision in that case, except that the person who gave the *348consent to the railroad (one Westervelt) died, and his lands were sold. The plaintiff bought the land in question with full knowledge that the defendant was in possession. The covenant runs with the land. It is not only to build, but to maintain, the fence on each side of the track, that is secured by the contract. The land under the road of the defendant was sold to plaintiff, of course, subject to the performance of the original agreement to sell. The covenant to maintain a fence, even if it needs a new one, is an obligation which the defendant owes to Moxley, and this obligation has been broken, causing a large loss to the-plaintiff since he acquired title, in 1885. The plaintiff may, therefore, maintain the action, although he purchased the land in 1885. Blain v. Taylor, 19 Abb. Pr. 228; Laws 1854, § 9, c. 282.