make a few changes to run the code on batch