refactored getKeywords()