added hangman functionality