bag_of_words.py divided into 3 files