insertion sort and tests