modified ARMSCGen.py source