rebuild table struct