change routing history logic for table sorter