added click and touch event handling