After the Battle of Seven Pines, on May 31 and June 1, McClellan and the Army of the Potomac sat passively at the outskirts of Richmond for almost a month. Lee, newly appointed commander of the Confederate Army of Northern Virginia, devoted this period to reorganizing his army and preparing a counter-attack. He also sent for reinforcements. Stonewall Jackson arrived on June 25 from the Shenandoah Valley following his successful Valley Campaign. He brought four divisions: his own, now commanded by Brig. Gen. Charles S. Winder, and those of Maj. Gen. Richard S. Ewell, Brig. Gen. William H. C. Whiting, and Maj. Gen. D.H. Hill.