Creates Insertion sort function