implement kNN and getNormalized but have not tested yet