working selectionSort and testing