rearrange class order