Made it possible for group to be specified as a dict, tuple or callable.