tweaking validate_ip