merging runAutoGroup and runAutoGroupMulti