Added support for groups, not tested yet