before 1840