fold groups of IPs together into a single list