Added grouping related functions