tweaked _setDomainName block