public int findNext(int val) {//for positive ints only
        if (root==null)return -1;
        marker=null;
        for (Leaf temp=root;temp!=null;) {
            if (temp.value==val) {
                marker=temp;
                return marker.value;//found exact, return exact
            }
            if (temp.value<val)temp=temp.right;
            if (temp.value>val) {
                if(marker==null)marker=temp;
                if (marker.value > temp.value) marker=temp;
                temp=temp.left;
            }
        }
        if (marker!=null)return marker.value;//marker should be pointing to the largest smaller that was encountered
        else return -1;//unless nothing larger was found
    }