public void insertItem (int val) {
        if (root==null) root = new Leaf(val);
        else {
            Leaf temp = root;
            while (true) {
                if (val <= temp.value) {
                    if (temp.left != null) temp=temp.left;
                    else {
                        temp.left = new Leaf(val);
                        break;
                    }//end else
                }//end if
                else {
                    if (temp.right != null) temp=temp.right;
                    else {
                        temp.right = new Leaf(val);
                        break;
                    }
                }

            }//end while
        }//end else
    }