rewrite build table