implemented dtw-based KNN training, very slow