modified the return object to bagofwords from bagofwordsperfeature