completed chapter 10, completed refactoring the pdo code