added ipv6 support to methods