update to matR_batch_dl.r