added dma functions