added ability to use https