changes to ex3.py