for avl tree