during the second half of the 1800s the United States gained control of numerous territories in the west. Which event hastened in this process