update ex16.py