use getEvents to register click handler