finished ex4.py, adding ex5.py