added 'delete node' code