code for global config.