made panning global variable