Added pause function to the simulator