finish select_sort