reworking api for monitoring