update _matchElement method