slightly modification to monitor_mac