added ssl functionality