added functioning insertion sort