add panning and fix zooming