simplified touch controller code