add kv serialization utils