small refactoring of frames