optimized title replacement