adds hooks for event handlers