added logic for ssl comms -- needs to be cleaned up.
newline commit