 Complete the following phrase:  At the beginning of the war, he served in various staff positions, before becoming a colonel and chief-of-staff of the Army of Virginia under General John Pope, where he saw action in the Battle of Cedar Mountain, the Second Battle of Bull Run, and the Battle of Chantilly. He later served as assistant chief-of-staff of the Army of the Potomac, being engaged in the battles of 