improved touch detection