added selection sort implementation