simplify matchesSelector