restructuring KeyValue proto