added functionality for optimizing set_param and get_cpars

seems to be a waste of time(?)