While Grant was composing the final terms of surrender at Appomattox, he noted the fine sword that Lee wore. Grant thought it over and decided it would be wrong to require officers to surrender their swords or to deprive them of their personal baggage and horses, so he added a sentence to that effect. This was in addition to letting all the Southern soldiers return to their homes and giving them food to ease their near starvation. After Grant and Lee signed the surrender, the two generals shook hands and Lee and his lone staff officer walked out to front porch, where he waited while his horse was saddled. Lee was clearly distracted, no doubt thinking of his men and their sacrifices for a cause that was lost. When the horse was led out, Lee swung his six-foot frame into the saddle and turned towards Grant, who doffed his hat in salute, a gesture in which he was joined by the assembled Union officers. Lee doffed his hat in return and rode off. Three days later, when the Confederate soldiers turned in their arms, Brigadier General Joshua Chamberlain ordered that each Confederate soldier be saluted as a gesture of reconciliation and respect. A few months later, Lee was indicted for treason by a grand jury. Grant threatened to resign his commission, forcing President Andrew Johnson to quash the indictment.