batch allocation correct version