add function domain_cmp