adding support for specifying the batch size