function pointers for msg and fld writing