a simple and clear implementation of AVL tree