adding a selection sort algorithm