separating hangman code into modules