Add support for grouping