factor out arg list construction code