modified tf_idf* scripts