in the process of templating avl tree