fixed best practices, created test for tf-idf