Added the checkGuess method