remove IdComparator class, update sort