Optimized replaced