new file:   frame.py
refactoring