updated expressionSwap class