logic was off for checking max groups in cross group transactions