added filtering for only IPv4 and IPv6 addresses dang