refactored to check multi-word strings