rearranged the index