write plans for event handling.