remove unused variable swapping