working on comparator