selection sort & insertion sort implementation