Changed order of execution of simulation