improve simulator.