add grouping and rates, fix All bug