fix frequency comparison to actually work in KNN, almost missed that if the second element was larger than the first it would just add both anyways