finishes word-check function. DRY later
first working version of hangman