small matcher refactoring