refactoring config