made changes to code just like the book, still having errors