maintenance done for binarytree