Worked on exercise 3