adding pydispatch and using it to send events for before click