wrote function for making batches out of workflows