add an opertimzed function setTouchMoveDetection