implements groups for all entities properly