private TreeNode checkChildrenForKeyWords(TreeNode currentNode,
			String currentWord) {
		List<TreeNode> children = currentNode.getChildren();
		for (TreeNode child : children) {
			if (child.isTempVisited())
				continue;
			child.setTempVisited(true);
			if (child.isAccessible()) {
				List<String> keyWords = child.getKeywords();
				for (String keyWord : keyWords)
					if (keyWord.equals(currentWord)) {
						currentNode = child;
						currentNode.setVisited(true);
						foundDialogue = true;
					}
			}
		}
		// this checks the currentNode for its own keywords, which is a way of
		// checking the root for keywords, since it is the child of nothing
		if (!foundDialogue) {
			List<String> keyWords = currentNode.getKeywords();
			for (String keyWord : keyWords) {
				if (keyWord.equals(currentWord)) {
					foundDialogue = true;
				}
			}
		}
		return currentNode;
	}