fixed insertion sorting, seems to work fine while table is in ascending sort