added click handling