modified select_finish