avlmap header and implementation