added parameter to pass in custom stopwords