fix k-d tree & knn algorithm.  Unit test passed!