refactoring. split up configuration.