updated sample40_callback.py