Added touch detection