added sorting to TF-IDF