refactored CC challenge