Updated Version of Sim.c