solved problems that made valg to crash: it required using node::left,right,parent in avl_node