Added grouping API.