Added methods to handle touch events