ws/challenge-response refactor