A simple implementation of the Knn Algorithm