Added touch event detection