The modified alternate.py