renamed simulation function