revamped kNN