added groupBy to getMany