rearrange architecture lib