fixing ex17.py