public AVLNode insert(AVLNode node, int x){//PASS
		//size++;
		if(root == null) {
			System.out.println("the root is null");
			AVLNode temp=new AVLNode(x);
			root=temp;
			return root;
		}
		else if(node == null) {
			node = new AVLNode(x);
			node.height = Math.max(getHeight(node.left), getHeight(node.right)) + 1;
			return node;
		}
		else if (x < node.data) {//insert left
			if (node.left == null) {
				node.left=new AVLNode(x);
				node.height = Math.max(getHeight(node.left), getHeight(node.right)) + 1;
				return node;
			}
			else node.left = insert(node.left, x);
			//balance
			if( (getHeight(node.left) - getHeight(node.right)) == 2) {
				System.out.println("LEFT CHILD TOO HIGH");
				if(getHeight(node.left.left) < getHeight(node.left.right)) {
					node.left = rotateR(node.left);
				}
				node = rotateR(node);
			}
			node.height = Math.max(getHeight(node.left), getHeight(node.right)) + 1;
			return node;
		}
		else{
			if (node.right == null) {
				node.right = new AVLNode(x);
				node.height = Math.max(getHeight(node.left), getHeight(node.right)) + 1;
				return node;
			}
			else node.right = insert(node.right, x);
			if( (getHeight(node.right) - getHeight(node.left)) == 2) {
				System.out.println("RIGHT CHILD TOO HIGH");
				System.out.println(node.data);
				if(getHeight(node.right.right) < getHeight(node.right.left)) {
					node.right = rotateL(node.right);
				}
				node = rotateL(node);
			}
			node.height = Math.max(getHeight(node.left), getHeight(node.right)) + 1;
			return node;
		}
	}