frontend optimizations