refactor Frame class