reduce param generation to one function