Added option for setting the domain