added ssl handling
added ssl handling