closer to rewrite