Tunnel function implemented.