update key struct