correct code and add batch.hs