cleaned up handleGuess method