updated for ssl