Re-arrange variables