refactoring, add a case class to monitor all the processes