modified create_batch.py