Combined addWord methods, with a new parameter to determine direction