finished ex05.py