fixing last bug in getWords