rearrange vars