reordering the states to stick together