code for avl