add monitoring logic