I haven't looked at the context, but can't you just store the key and the value together?