removed bugs in similarity method. modified idf vector calculation