matcher rewrites