added in panning and zooming