Renamed touch boolean to touchEvents to avoid conflict with touch callback function