Explain how the final military actions of the war led to a union victory. Respond in at least three sentences.