a few changes in the ex.py file