minor modification to tunnel script