more rewrite