Use the version of the algorithm presented in the book.