using SSLSocket
refactor
refactor