refactoring in the config