insert sort works