adding ssl functionality