added code for zooming