updated simulation script