adding ex40.py