improved getting coordinates of touch events