implemented bruteforce nearest neighbor search, correct results, now I can try to improve it