fix for ex8.py