adding knn code and plot