revised logic for groups & contacta