simplifying cmp