added selection sort impl