Change String[] ipAddresses to use a Set