modified for the dsim