What country was California part of in 1840?