reorder gem phases