refactored to remove Config class