(not great) implementation of protobuf comparison