it seems I have re-organized Monitor.py code