added pan dragging