First rewrite