i think i just fixed the runSimulation function. \o/