implemented ability to turn panning on and off