took out extraneous statements
separated out a function
ignore private key
got tls working