Updated simulator.py