attempted an implementation of selection sort, compiles, and (sort of) works, but needs some debugging