added compute_ip as parameter