- refactored config code