added ipv6 support