refactored methods for text preprocessing and included document term matrix