Complex sentence: When Lee invaded Pennsylvania in the summer of 1863, he needed all units, so the Third Corps came with him.
Split into simpler sentences: When Lee Invaded Pennsylvania in 1863, he needed all units. So the Third Corps came with him.