rearrange structures