Optimization replacement method