update rect.py to match refactor