scrap and rewrite