handle protobuf