added code to monitor class