grouping by constant ints implemented