modified prob_1.py