Much thrashing around to get groupIds