Update simulation_functions.R