simple insertion sort implementation