modified to simplify the dflash test