Rearrange math