update key generation