adding comparator to the collection