exercise 6.5.1
completed chapter 6 exercies