checking number of matches