refactoring monitoring service implementation