add update-keys and update-vals functions