what did the government dp to help build railroads?