begining chapter 2, root finding