How did the railroad industry pay for the expansion of railroads?