Rearrange solution