resolve order of comparators