listening for a click event