rearrange linked table