solution rearrange