Refactoring processChallenge