modify insertion sort and implement shell sort