avl tree

implementation is bad. every time the tree has to be extracted from a
pair: snd (bal, tree)