Replace ode with function calls