created selectionsort