improved the framework