Added tls as optional