added ipv4/ipv6 validation