added mechanism to check challenge-response