simplify comparsion procedure