added IPv6 support