completed 2-gram.py