it should also be in a try/except KeyError to catch non-existing groups