added comparator versions of distinct operation, too