Modified the code so it no longer is Simulation based but rather Run based.