writing checkGuess()

extending functions to store values

fixed scope issue