improved tfidf efficiency