added in code for the monitoring