remove hardcoded domain from if statements