miner.php allow gen before (bgen) and after (gen) grouping