with_params function

This is a helper function to set the parameter values