updated the code with ssl certificate