refactor framework