Added knn classification and updated prior code.