ex24.py updated