refactored isWordIn