public TreeNode insert(int value) {

		TreeNode current = root, parent = null;
		boolean isLeft = false;

		while (current != null) {

			parent = current;

			if (current.val == value) {
				// I ignore this case
			} else if (current.val > value) { // goes left
				current = current.left;
				isLeft = true;
			} else { // goes right
				current = current.right;
				isLeft = false;
			}
		}

		TreeNode newNode = new TreeNode(value);

		if (parent == null) {
			root = newNode;
		} else if (isLeft == true) {
			parent.left = newNode;
		} else {
			parent.right = newNode;
		}

		return newNode;
	}