bind all of the event handlers