small refactoring to enable testing for config