An implementation of AVL trees