Made selection sort