wip externilize the root finder