selection sort implementation. typos