How did the United States benefit from the Mexican War ?