rewrite touch handler as class