completed method "nearestNeigborValue"