added node deletion function