add the selection sort method