made a checkWord and addWord method