Comparator and sort added