there is no BatchID here, change to Int and instead of .next just do (x + 1)