on-click selection sort of working