refactored validate_keywords to return list