more additions to rewrite