modify PERM/PERM.py