findRoot optimization