private BalancedTreeNode<E> balance(BalancedTreeNode<E> node) {
		if(node == null) {
			return node;
		}
		
		if(height(node.left)-height(node.right) == 2) {
			if(height(node.left.left) >= height(node.left.right)) {
				node = rightRotate(node); //LL
			} else {
				node = leftRightRotate(node); //LR
			}
		} else if(height(node.right)-height(node.left) == 2) {
			if(height(node.right.right) >= height(node.right.left)) {
                node = leftRotate(node); //RR
            } else {
                node = rightLeftRotate(node); //RL
            }
		}
		node.height = (height(node.left)>height(node.right))?height(node.left)+1:height(node.right)+1;
		return node;
	}