rewrite TableOfRecord according to the legacy output