add support for optional object grouping