added comparator and operator