removed redundant groups check