handle the touch events