avl tree and stack