created a click handler