redid the first problem after looking at the pdf