add group dimension
clearer errors and conditionality for missing groups, franchise. added default handling when group missing.