 He became private secretary to Henry Labouchere, later 1st Baron Taunton, who was then the President of the Board of Trade.In 1842, he was made secretary to the railway department, and retained this post until 1847.He had by then become an authority on railways, and had been a member of the Dalhousie Railway Commission; it was at his suggestion that the "parliamentary" rate of a penny a mile was instituted.