rewrite/update/cleanup