config refactoring