reorganization of comparator