a bit more dma generalization