refactor proto_util