added avl stuff