test for rewrite