added ipv6 support, closes issue 4