updated cert handling