added touch controller logic