rearrange class