recode to write_payload