refactoring: replased ugly method with correct matcher