documentation for simulate()