updated style to work for both http and https.