code to enable and disable domains