changed certificate function call