modified constraints of domains
add unit tests of domains