added weighted knn prediction option