simplify group removal conditional