First stab at rewrite.