add cosine with idf