Working nearest neighbor