first steps in the rewrite.