add group option to query api