rearrange solution structure