adding is_ipv4 and is_ipv6 functions
adding array_do function