added some simple AVL stuff