refactored YAML serialization of the batch