refactor the framework 2