to stay at his country home Ravensworth. Fitzhugh wrote to United States Secretary of War, John C. Calhoun, urging that Robert be given an appointment to the United States Military Academy at West Point. Fitzhugh had young Robert deliver the letter. Lee entered West Point in the summer of 1825. At the time, the focus of the curriculum was engineering; the head of the United States Army Corps of Engineers supervised the school and the superintendent was an engineering officer. Cadets were not permitted leave until they finished two years of study and were rarely allowed off the academy grounds. Lee graduated second in his class behind Charles Mason (who resigned from the Army a year after graduation). Lee did not incur any demerits during his four-year course of study, a distinction shared by only five of his 45 classmates. In June 1829, Lee was commissioned a brevet second lieutenant in the Corps of Engineers. After graduation, while awaiting assignment, he returned to Virginia to find his mother on her deathbed; she died at Ravensworth on July 26, 1829. Military engineer career On August 11, 1829, Brigadier General Charles Gratiot ordered Lee to Cockspur Island, Georgia. The plan was to build a fort on the marshy island which would command the outlet of the Savannah River. Lee was involved in the early stages of construction as the island was being drained and built up. In 1831, it became apparent that the existing plan to build what became known as Fort Pulaski would have to be revamped, and Lee was transferred to Fort Monroe at the tip of the Virginia Peninsula (today in Hampton, Virginia). While home in the summer of 1829, Lee had apparently courted Mary Custis whom he had known as a child. Lee obtained permission to write to her before leaving for Georgia, though Mary Custis warned Lee to be "discreet" in his writing, as her mother read her letters, especially from men. Custis refused Lee the first time he asked to marry her; her father did not believe the son of the disgraced Light-Horse Harry Lee was a suitable man for his daughter. She accepted him with her father's consent in September 1830, while he was on summer leave, and the two were wed on June 30, 1831. Lee's duties at Fort Monroe were varied, typical for a junior officer, and ranged from budgeting to designing buildings.