avoided using SearchPattern for matching