add copy based insertion sort to make it more efficient in most circumstances