more code to handle invalid guesses