How did the nature of immigration to the US change during the late 1800's?

They worked on the railroads and helped economics