updated the simulation script