add pem support