added the stopwords and code refactoring