frame refactored