public finger_print closest_finger(finger_print fp){
            double min_distance=Double.MAX_VALUE;
            finger_print fret=null;
            fp.comparisons=0;
            for(int i=0;i<final_pivot_list.size();i++){
                    fp.comparisons++;
                    node n=final_pivot_list.get(i);
                    double d=fp.getDistance(n.pivot);
                    if(n.isOutlier_pivot()){
                            if(d - n.farthest_child > min_distance){
                                    break;
                            }
                    }
                    else if(Math.abs(d - (n.farthest_child)) <= min_distance){
                            for(int j=0;j<n.list_objects.size();j++){
                                    fp.comparisons++;
                                    if(fp.getDistance(n.list_objects.get(j)) < min_distance){
                                            min_distance =fp.getDistance(n.list_objects.get(j));
                                            fret=n.list_objects.get(j);
                                    }
                            }
                            if(d < min_distance){
                                    min_distance =d;
                                    fret=n.pivot;
                            }
                    }
            }
            return fret;
    }