Combine groupa and groupb into rsg. No point making it overly complex.