updated to use SSL