implemented delete from tree