protobuf basic logic done