better handling of touch events