implement the monitor