resolve optimizations
optimized the optimization