I don't understand why you make `pan` global ? if you put `handleTouchEnd` beside `handleTouchStart` you don't need that ,right ?