add certification verification and expire check