look to refactor if using getWords explicitly for autoComplete