set cmp as private method