Changing domain dynamically