working getRelatedWords.js