improve matching performance