Almost rewrite