improved avatar touch code