renamed and simplified, tests for 'domain'