Update simulator.c