refactor monitorGroup