add some functions to group pars inside sim function