Finishes chapter 6 exercises and fixes syntax error