final working insertion sort python