this way index reduction still works, but simulation time is longer due to repeated calls of setState_ph