change Variables from right to left