Implementation of Knn (Not finished yet).