complete monitor script