nn

added nearestNeighbor()