adding some safety to validate_group(), expanding cryptic comments