Prior to the 1840s, a majority of the immigrants from Europe were