add spanshot loop with protobuf