changed bagOfWords access