tear down and rewrite