working on exercise 6.1