rewrite of remove node. again.