added dpmem code