alternate isAGroup function