parameterised knn