changed ssl implementation