update value for a key