rearrange classes