updates to matR_batch_dl.r