move _format and _transform into macro variables