private Tree234Node split(Tree234Node node) {
	  int key = node.key2;
	  Tree234Node child1 = new Tree234Node(null, node.key1);
	  child1.child1 = node.child1;
	  child1.child2 = node.child2;
	  Tree234Node child2 = new Tree234Node(null, node.key3);
	  child2.child1 = node.child3;
	  child2.child2 = node.child4;
	  if (!node.isLeafNode()) {
		  node.child1.parent = child1;
		  node.child2.parent = child1;
		  node.child3.parent = child2;
		  node.child4.parent = child2;
	  }

	  if (node.isRootNode()) {
		  root = new Tree234Node(null, node.key2);
		  child1.parent = root;
		  child2.parent = root;
		  root.child1 = child1;
		  root.child2 = child2;
		  return root;
	  }

	  // here parent is guaranteed to be not full
	  Tree234Node parent = node.parent;
	  switch (parent.keys) {
		case 1: {
			if (parent.child1 == node)
				insertFront(parent, key, child1, child2);
			else
				insertBack(parent, key, child1, child2);
			break;
		}
		case 2: {
			if (parent.child1 == node)
				insertFront(parent, key, child1, child2);
			else if (parent.child2 == node)
				insertMiddle(parent, key, child1, child2);
			else
				insertBack(parent, key, child1, child2);
			break;
		}
	  }
	  return parent;
  }