added field for comparator in EventsPriorityQueue