Completed Insertion sort