Completed part 1 (KNN Algorithm)