new get_group_ids and get_groups improved