adding check for tunnel