 Complete the following phrase:  Rains was born in Craven County in North Carolina in 1817. He graduated from the United States Military Academy at West Point in 1842 as third out of a class of 56; being commissioned a 2nd Lieutet in the Corps of Engineers. In the next year he transferred to the 4th U.S. Artillery Regiment and then became an assistant professor of chemistry, mineralogy, and geology back at West Point. He participated in the MexicanAmerican War, fighting at Vera Cruz, Cerro Gordo, Contreras, Churubusco, 