added a click handler