rearrange the structure