maintain sort order while adding to a table that is sorted