move initialization code into cert creation function (requires that cert creation happen first)