Optimized Problem7