adding tls routines