proper rewrite