new wrapper function for running simulations; still need to write code for when local==F
added .export = 'senc_sim_fun' in the foreach statement so that the function is passed along to the worker cores; was getting an error for some reason that it couldn't find this function, but now seems ok