new function for TFIDF