added support for multiple ip addresses