optimized the framework