updates public key