finished knearest neighbors problem