successfully implemented bag of words