moved to protobuf serialization.