consolidated touch code