changed ex16.py according to study drills nr 3