update solve_ode to handle var var case

gradients calls are currently commented out until var stack issue is
fixed