rewrite when remove