restructuring for batch submission, still need to check merging and resubmission for batch