refactoring, adding config