nn function

Nearest Neighbor