knn process, minor latex changes