fixed some minor bugs in the knn solution