interim commit, make a template to handle the ssl and non ssl cases for connections