finish problem_set3.py