add cert download function