refactor 0016 and SelectionSort