improved zoom function.