added passing self_ip to client