Update ex40

Added some comments