 He constructed an extension to the pits from the Edinburgh & Dalkeith Railway (E&DR) terminus at Dalhousie Mains at his own expense, a distance of .This required a bridge over the South Esk; the total length was .The line was named "The Marquis of Lothian's Waggonway", and the first part opened on 21 January 1832, running east from the South Esk viaduct to reach pits at Bryans, immediately east of Newtongrange.