added removal of node code