update refactor.py