pycharm files
refactor to support RANGE mode