x12 - wrapper function and structure for batch processing