Added simulation(model) code