create 2 ways of comparators