optimized the zoom feature