adding events to ODE