selectionSort mostly working