added method for deleting a node with a certain id