handle empty groups