refactored config