remove batchSize loop in source