re-define the onTouchBasedDevice function