updated the common operation of binary tree