Changed root finding mechanism, major improvement