refactoring MatchInText