ch 5, rewrite b/c of updates in the book