fix groups and consolidate header