Added support for grouped data.