move tx function from ep_write to work_body