starting to structure the param_opt code :)