grouping: making monotonic? faster.