this line needs to go outside the `withBatch`