attempt at AVL tree implementation from scratch