implemented 50% unit tests for cmp