knn mapper reducer implementation updated