I think we're doing this parameter setting in other places as well. Is it worth factoring that into a helper function?