set the outBatch index as appropriate