added domain variable to read from config file