deleteNode modified