add addWord and editWord functionality