optimize public pem