refactor the configuration manager