add logic for detecting dead groups - requires testing