refactoring config into a class: preparation