refactor exact ode detection