Finalized rewrite