touch interface code