Simulator code updated