zooming and panning variable working