selection and insertion sort algorithms